Created attachment 347090 [details] testcase, move mouse to top left corner, open console and reload and move mouse per instructions Per UIEvent spec, mouseenter/leave are composed events, so they do propagate from shadow DOM to host. But, assuming I'm reading the code right, the optimizations in EventHandler.cpp make mouseenter/leave handling depend on whether there are capturing event listeners, even though the listener on host can be bubbling listener, since when event is handled at that level, it is AT_TARGET, and all the listeners should be called. https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/EventHandler.cpp#L2529
(In reply to Olli Pettay (:smaug) from comment #0) > Created attachment 347090 [details] > testcase, move mouse to top left corner, open console and reload and move > mouse per instructions > > Per UIEvent spec, mouseenter/leave are composed events, so they do propagate > from shadow DOM to host. > But, assuming I'm reading the code right, the optimizations in > EventHandler.cpp make mouseenter/leave handling depend on whether there are > capturing event listeners, even though the listener on host can be > bubbling listener, since when event is handled at that level, it is > AT_TARGET, and all the listeners should be called. The bubbling event listeners are checked as we walk up the ancestors: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/page/EventHandler.cpp#L2571 The bug we have is that we're not walking up past the shadow root here. We also need to make these events not-composed per https://github.com/w3c/uievents/issues/208
Created attachment 349229 [details] Fixes the bug
Comment on attachment 349229 [details] Fixes the bug Attachment 349229 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9136486 New failing tests: fast/events/shadow-event-path.html
Created attachment 349234 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 349229 [details] Fixes the bug Attachment 349229 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9136533 New failing tests: fast/events/shadow-event-path.html
Created attachment 349236 [details] Archive of layout-test-results from ews116 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 349229 [details] Fixes the bug Attachment 349229 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/9136558 New failing tests: fast/shadow-dom/mouseenter-mouseleave-across-shadow-boundary.html fast/shadow-dom/mouseenter-mouseleave-inside-shadow-tree.html fast/shadow-dom/mouseenter-mouseleave-on-slot-parent.html
Created attachment 349237 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
Created attachment 349242 [details] Fixed tests
<rdar://problem/44251774>
Thanks for the reviews!
Committed r235865: <https://trac.webkit.org/changeset/235865>