Summary: | First parameter to window.showModalDialog() should be mandatory | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, rniwa, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar, WebExposed | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Chris Dumez
2016-01-25 12:29:38 PST
Created attachment 269780 [details]
Patch
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. 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. Comment on attachment 269780 [details] Patch Clearing flags on attachment: 269780 Committed r195594: <http://trac.webkit.org/changeset/195594> All reviewed patches have been landed. Closing bug. |