Bug 14465

Summary: window.open() uses the literal "undefined" as the URL
Product: WebKit Reporter: mitz
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: javascript:open()
Attachments:
Description Flags
Patch
mitz: review-
update patch mitz: review+

mitz
Reported 2007-06-29 14:30:51 PDT
When the first argument to window.open is missing, it uses the literal string "undefined" as the URL argument, and opens a URL ending with "undefined" in the new window.
Attachments
Patch (2.91 KB, patch)
2007-06-29 14:31 PDT, mitz
mitz: review-
update patch (3.61 KB, patch)
2007-07-04 19:12 PDT, Sam Weinig
mitz: review+
mitz
Comment 1 2007-06-29 14:31:59 PDT
Created attachment 15319 [details] Patch I failed to make an automated test.
mitz
Comment 2 2007-06-29 14:39:17 PDT
Comment on attachment 15319 [details] Patch Sam has a better patch.
Sam Weinig
Comment 3 2007-07-04 19:12:40 PDT
Created attachment 15391 [details] update patch Not much better than mitz's patch but uses the right connivence methods. I have used Mitz's manuel layout test too, as there does not seem to be a good way to automate it.
mitz
Comment 4 2007-07-04 23:35:35 PDT
Comment on attachment 15391 [details] update patch r=me
Sam Weinig
Comment 5 2007-07-05 09:15:59 PDT
Landed in r24018.
David Kilzer (:ddkilzer)
Comment 6 2007-07-08 09:51:49 PDT
See also r24019 for a fix to window.showModalDialog.
Note You need to log in before you can comment on or make changes to this bug.