WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
153436
First parameter to window.showModalDialog() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=153436
Summary
First parameter to window.showModalDialog() should be mandatory
Chris Dumez
Reported
2016-01-25 12:29:38 PST
First parameter to window.showModalDialog() should be mandatory. This matches the behavior of Firefox. Also, having it optional causes the W3C HTML test suite to hang because it mistakenly pops up a modal dialog during the test.
Attachments
Patch
(29.17 KB, patch)
2016-01-25 12:52 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-01-25 12:52:10 PST
Created
attachment 269780
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2016-01-25 12:53:00 PST
<
rdar://problem/24331306
>
Radar WebKit Bug Importer
Comment 3
2016-01-25 12:53:26 PST
<
rdar://problem/24331317
>
youenn fablet
Comment 4
2016-01-25 23:42:10 PST
Comment on
attachment 269780
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=269780&action=review
> LayoutTests/imported/w3c/ChangeLog:10 > + the workaround but this is fixed now.
Great to see that fixed!
> LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html:2299 > + any showModalDialog(DOMString url, optional any argument);
This method is taking two parameters, one being optional. But JSDOMWindow::showModalDialog is accessing argument 0 and argument 2, argument 1 being not accessed in the custom code. This seems inconsistent.
Chris Dumez
Comment 5
2016-01-26 09:23:47 PST
Comment on
attachment 269780
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=269780&action=review
>> LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html:2299 >> + any showModalDialog(DOMString url, optional any argument); > > This method is taking two parameters, one being optional. > But JSDOMWindow::showModalDialog is accessing argument 0 and argument 2, argument 1 being not accessed in the custom code. > This seems inconsistent.
WebKit does not do anything with this second argument (just ignores it). However, we support a third optional argument for window options, like Firefox:
https://developer.mozilla.org/en-US/docs/Web/API/Window/showModalDialog
At least we are consistent with Firefox.
Chris Dumez
Comment 6
2016-01-26 10:04:33 PST
Comment on
attachment 269780
[details]
Patch Clearing flags on attachment: 269780 Committed
r195594
: <
http://trac.webkit.org/changeset/195594
>
Chris Dumez
Comment 7
2016-01-26 10:04:39 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug