When dispatching e.g. an "animationstart" event, WebKit falls back to "webkitanimationstart" if there were no listeners for "animationstart". This happens in EventTarget::fireEventListeners. This behavior has made its way into DOM, and was tweaked to only apply to trusted events: https://github.com/whatwg/dom/issues/404 https://github.com/whatwg/dom/pull/406 https://github.com/w3c/web-platform-tests/pull/4687
I like it. I'll prepare a patch.
Created attachment 301514 [details] Patch
Comment on attachment 301514 [details] Patch Looks like it is failing a test. I'll investigate.
Comment on attachment 301514 [details] Patch Attachment 301514 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3116930 New failing tests: fast/events/wheelevent-in-scrolling-div.html
Created attachment 301517 [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 on attachment 301514 [details] Patch Attachment 301514 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3116984 New failing tests: fast/events/wheelevent-in-scrolling-div.html
Created attachment 301518 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 301520 [details] Patch
Comment on attachment 301520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301520&action=review > Source/WebCore/dom/EventTarget.cpp:205 > + // Do not fall back to legacy types when even is not trusted. Typo: "even".
Created attachment 301524 [details] Patch
Comment on attachment 301524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301524&action=review > Source/WebCore/dom/EventTarget.cpp:206 > + // Do not fall back to legacy types when event is not trusted. > + if (!event.isTrusted()) I think it would have been clearer to say "Only fallback to legacy types on trusted events".
Comment on attachment 301524 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301524&action=review >> Source/WebCore/dom/EventTarget.cpp:206 >> + if (!event.isTrusted()) > > I think it would have been clearer to say "Only fallback to legacy types on trusted events". Sure, I can update the comment before landing.
Weird, I thought the patch had already been landed.
Created attachment 301536 [details] Patch
Committed r212321: <http://trac.webkit.org/changeset/212321>