Bug 169176 - Align initEvent / initCustomEvent / initMessageEvent with the latest specification
Summary: Align initEvent / initCustomEvent / initMessageEvent with the latest specific...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks: 169295
  Show dependency treegraph
 
Reported: 2017-03-04 16:06 PST by Chris Dumez
Modified: 2017-03-07 11:41 PST (History)
10 users (show)

See Also:


Attachments
WIP patch (3.39 KB, patch)
2017-03-04 16:07 PST, Chris Dumez
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (818.46 KB, application/zip)
2017-03-04 17:20 PST, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (968.63 KB, application/zip)
2017-03-04 17:26 PST, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-elcapitan (1.53 MB, application/zip)
2017-03-04 17:30 PST, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (16.33 MB, application/zip)
2017-03-04 17:39 PST, Build Bot
no flags Details
WIP Patch (267.90 KB, patch)
2017-03-04 19:23 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (277.12 KB, patch)
2017-03-06 09:53 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-03-04 16:06:01 PST
Align initEvent / initCustomEvent / initMessageEvent with the latest specification:
- https://github.com/whatwg/html/pull/2410
- https://github.com/w3c/web-platform-tests/pull/5044
- https://github.com/whatwg/dom/pull/417
- https://github.com/w3c/web-platform-tests/pull/5043
Comment 1 Chris Dumez 2017-03-04 16:07:14 PST
Created attachment 303416 [details]
WIP patch
Comment 2 Build Bot 2017-03-04 17:20:03 PST
Comment on attachment 303416 [details]
WIP patch

Attachment 303416 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3243428

New failing tests:
imported/w3c/web-platform-tests/dom/interfaces.html
fast/eventsource/eventsource-attribute-listeners.html
fast/events/init-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html
Comment 3 Build Bot 2017-03-04 17:20:07 PST
Created attachment 303419 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-03-04 17:25:58 PST
Comment on attachment 303416 [details]
WIP patch

Attachment 303416 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/3243436

New failing tests:
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html
fast/eventsource/eventsource-attribute-listeners.html
fast/events/init-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html
imported/w3c/web-platform-tests/dom/interfaces.html
Comment 5 Build Bot 2017-03-04 17:26:02 PST
Created attachment 303421 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 6 Build Bot 2017-03-04 17:30:26 PST
Comment on attachment 303416 [details]
WIP patch

Attachment 303416 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3243434

New failing tests:
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html
fast/events/init-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html
fast/eventsource/eventsource-attribute-listeners.html
Comment 7 Build Bot 2017-03-04 17:30:30 PST
Created attachment 303423 [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
Comment 8 Build Bot 2017-03-04 17:39:23 PST
Comment on attachment 303416 [details]
WIP patch

Attachment 303416 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3243440

New failing tests:
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html
fast/eventsource/eventsource-attribute-listeners.html
fast/events/init-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.html
imported/w3c/web-platform-tests/dom/interfaces.html
Comment 9 Build Bot 2017-03-04 17:39:27 PST
Created attachment 303424 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 10 Chris Dumez 2017-03-04 19:23:35 PST
Created attachment 303433 [details]
WIP Patch
Comment 11 Chris Dumez 2017-03-06 09:53:58 PST
Created attachment 303520 [details]
Patch
Comment 12 Alex Christensen 2017-03-07 08:35:00 PST
Comment on attachment 303520 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303520&action=review

> LayoutTests/fast/eventsource/eventsource-attribute-listeners.html:39
> -evt.initMessageEvent("message", false, false, "hello", null, null, null, null);
> +evt.initMessageEvent("message", false, false, "hello", null, null, null, []);

What happens if you call this with null?
Comment 13 Chris Dumez 2017-03-07 08:36:20 PST
(In reply to comment #12)
> Comment on attachment 303520 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303520&action=review
> 
> > LayoutTests/fast/eventsource/eventsource-attribute-listeners.html:39
> > -evt.initMessageEvent("message", false, false, "hello", null, null, null, null);
> > +evt.initMessageEvent("message", false, false, "hello", null, null, null, []);
> 
> What happens if you call this with null?

It throws a TypeError as per WebIDL. This is consistent with Firefox as well. There is a slight backward compatibility risk here, as mentioned in the Changelog but we can always mark the parameter as nullable later if we see it breaks anything.
Comment 14 WebKit Commit Bot 2017-03-07 09:03:20 PST
Comment on attachment 303520 [details]
Patch

Clearing flags on attachment: 303520

Committed r213517: <http://trac.webkit.org/changeset/213517>
Comment 15 WebKit Commit Bot 2017-03-07 09:03:26 PST
All reviewed patches have been landed.  Closing bug.