dispatchEvent() should throw an InvalidStateError if the event's initialized flag is not set, and should allow dispatching events with an empty type as long as it is initialized: https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent (step 1) Currently, WebKit relies on the event type being empty and throws a UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0. This is covered by the following newly imported W3C test: http/tests/w3c/dom/events/EventTarget-dispatchEvent.html
rdar://problem/22565782 rdar://problem/22565485
Created attachment 260597 [details] Patch
Comment on attachment 260597 [details] Patch r=me
Comment on attachment 260597 [details] Patch Clearing flags on attachment: 260597 Committed r189386: <http://trac.webkit.org/changeset/189386>
All reviewed patches have been landed. Closing bug.
This change appears to have made several tests assert, rolling out. https://build.webkit.org/results/Apple%20Yosemite%20Debug%20WK2%20(Tests)/r189417%20(6763)/results.html
Re-opened since this is blocked by bug 148883
Created attachment 260694 [details] Patch
Comment on attachment 260694 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=260694&action=review > Source/WebCore/dom/EventTarget.cpp:-194 > - ASSERT(event && !event->type().isEmpty()); Fixed outdated assertion as it is now valid to dispatch an event with an empty type, as long as the event has its initialized flag set to true.
Comment on attachment 260694 [details] Patch Clearing flags on attachment: 260694 Committed r189452: <http://trac.webkit.org/changeset/189452>