See https://github.com/whatwg/dom/issues/334 for the discussion that led to this, https://github.com/whatwg/dom/pull/407 for the DOM Standard change, and https://github.com/web-platform-tests/wpt/pull/4790 & https://github.com/web-platform-tests/wpt/pull/10329/files for tests that Safari fails.
Created attachment 344229 [details] Patch
Comment on attachment 344229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344229&action=review > Source/WebCore/bindings/js/JSEventListener.cpp:163 > + if (!isTargetInsideShadowTree) It probably doesn't matter but maybe we should also avoid calling setCurrentEvent later when we restore the saved event to maintain the symmetry?
Comment on attachment 344229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344229&action=review >> Source/WebCore/bindings/js/JSEventListener.cpp:163 >> + if (!isTargetInsideShadowTree) > > It probably doesn't matter but maybe we should also avoid calling setCurrentEvent later when we restore the saved event to maintain the symmetry? I prefer it this way for a couple of reasons: - Trying to avoid the setting / restore adds a little bit of code complexity / branching - Setting the event is cheap - The current behavior matches the spec exactly (https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke) I am not opposed to doing it if you feel strongly about it though.
Comment on attachment 344229 [details] Patch Attachment 344229 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/8429641 New failing tests: accessibility/smart-invert-reference.html
Created attachment 344240 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 344240 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 Failure does not look related
Comment on attachment 344229 [details] Patch Clearing flags on attachment: 344229 Committed r233489: <https://trac.webkit.org/changeset/233489>
All reviewed patches have been landed. Closing bug.
<rdar://problem/41799255>