Align event dispatching logic with Blink and Gecko.
Created attachment 366499 [details] WIP Patch
Comment on attachment 366499 [details] WIP Patch Attachment 366499 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11740522 Number of test failures exceeded the failure limit.
Created attachment 366503 [details] Archive of layout-test-results from ews102 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366499 [details] WIP Patch Attachment 366499 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11740528 Number of test failures exceeded the failure limit.
Created attachment 366505 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 366499 [details] WIP Patch Attachment 366499 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11740519 Number of test failures exceeded the failure limit.
Created attachment 366508 [details] Archive of layout-test-results from ews113 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 366520 [details] WIP Patch
Comment on attachment 366520 [details] WIP Patch Attachment 366520 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11742323 New failing tests: fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html media/media-load-event.html
Created attachment 366528 [details] Archive of layout-test-results from ews102 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 366529 [details] Patch
Comment on attachment 366529 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366529&action=review > Source/WebCore/ChangeLog:14 > + would first call the capturing ones and then the non-capturing ones. However, > + this behavior was not compatible with Gecko or Blink. This is the new intended behavior after https://github.com/whatwg/dom/issues/685 We should just fix WPT tests instead.
The current WebKit behavior is intentional.