RESOLVED FIXED Bug 178052
Update Document.createEvent for recent DOM specification changes
https://bugs.webkit.org/show_bug.cgi?id=178052
Summary Update Document.createEvent for recent DOM specification changes
Darin Adler
Reported 2017-10-07 14:46:45 PDT
Update Document.createEvent for recent DOM specification changes
Attachments
Patch (24.33 KB, patch)
2017-10-07 14:58 PDT, Darin Adler
cdumez: review+
buildbot: commit-queue-
Archive of layout-test-results from ews115 for mac-elcapitan (1.79 MB, application/zip)
2017-10-07 16:23 PDT, Build Bot
no flags
Darin Adler
Comment 1 2017-10-07 14:58:41 PDT
Build Bot
Comment 2 2017-10-07 16:23:05 PDT
Comment on attachment 323102 [details] Patch Attachment 323102 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4790100 New failing tests: imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html
Build Bot
Comment 3 2017-10-07 16:23:07 PDT
Created attachment 323105 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Chris Dumez
Comment 4 2017-10-07 16:29:36 PDT
(In reply to Build Bot from comment #2) > Comment on attachment 323102 [details] > Patch > > Attachment 323102 [details] did not pass mac-debug-ews (mac): > Output: http://webkit-queues.webkit.org/results/4790100 > > New failing tests: > imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading- > documents/beforeunload-canceling.html This is actually a new PASS: --- /Volumes/Data/EWS/WebKit/WebKitBuild/Debug/layout-test-results/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt +++ /Volumes/Data/EWS/WebKit/WebKitBuild/Debug/layout-test-results/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-actual.txt @@ -2,7 +2,7 @@ PASS Returning a string must not cancel the event: CustomEvent, non-cancelable PASS Returning a string must not cancel the event: CustomEvent, cancelable FAIL Returning false must not cancel the event, because it's coerced to the DOMString "false" which does not cancel CustomEvents: CustomEvent, cancelable assert_false: The event must not have been canceled expected false got true -FAIL Returning a string must not cancel the event: BeforeUnloadEvent with type "click", cancelable The operation is not supported. +PASS Returning a string must not cancel the event: BeforeUnloadEvent with type "click", cancelable PASS Returning null with a real iframe unloading PASS Returning undefined with a real iframe unloading PASS Returning with a real iframe unloading
Chris Dumez
Comment 5 2017-10-07 16:38:03 PDT
Comment on attachment 323102 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323102&action=review I had not touched this area because last time I checked, browsers disagreed with the specification and behaved widely differently. Also, the spec did not make sense in some cases. However, the changes here make sense. r=me > Source/WebCore/dom/Document.cpp:4273 > + if (equalLettersIgnoringASCIICase(type, "beforeunloadevent")) I have confirmed that beforeunloadevent is supported by both Firefox and Chrome. > Source/WebCore/dom/Document.cpp:4279 > + if (equalLettersIgnoringASCIICase(type, "event") || equalLettersIgnoringASCIICase(type, "events") || equalLettersIgnoringASCIICase(type, "htmlevents") || equalLettersIgnoringASCIICase(type, "svgevents")) I have confirmed that svgevents is supported by both Firefox and Chrome. > Source/WebCore/dom/Document.cpp:4281 > + if (equalLettersIgnoringASCIICase(type, "focusevent")) I have confirmed that focus event is supported by both Firefox and Chrome. > Source/WebCore/dom/Document.cpp:4329 > + if (equalLettersIgnoringASCIICase(type, "keyboardevents")) Looks like Chrome dropped it already, Firefox did not. > Source/WebCore/dom/Document.cpp:4335 > + if (equalLettersIgnoringASCIICase(type, "popstateevent")) Looks like Firefox dropped it already, Chrome did not.
Darin Adler
Comment 6 2017-10-07 16:40:36 PDT
Comment on attachment 323102 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=323102&action=review >> Source/WebCore/dom/Document.cpp:4329 >> + if (equalLettersIgnoringASCIICase(type, "keyboardevents")) > > Looks like Chrome dropped it already, Firefox did not. I am guessing the Chrome team researched whether this was actually used on the web and that’s why Hixie moved it to unsupported but did not move "MouseEvents" to unsupported.
Darin Adler
Comment 7 2017-10-07 16:43:06 PDT
Comment on attachment 323102 [details] Patch Side note: Honestly if it was up to me I would not want us (all browser vendors) adding these new strings for createEvent. The function makes broken events with a type string that is the empty string and other peculiarities. I can’t see why adding new ones has value going forward.
Darin Adler
Comment 8 2017-10-07 16:44:50 PDT
Radar WebKit Bug Importer
Comment 9 2017-10-07 16:45:39 PDT
Note You need to log in before you can comment on or make changes to this bug.