This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1491219 [wpt PR 13002] - Call capture event listeners in capturin…
…g phase at shadow hosts, a=testonly Automatic update from web-platform-testsCall capture event listeners in capturing phase at shadow hosts Chromestatus entry is here: https://www.chromestatus.com/feature/5636327009681408 Per the discussion of whatwg/dom#685, Blink will try to align the event dispatch behavior with other browsers; Call capture event listeners in capturing phase at shadow hosts. So far, Blink and WebKit call capture event listeners in *bubbling* phase, instead of *capturing* phase, at shadow hosts. Other browsers: - Safari: Will try to change the behavior in the next Safari Technical Preview. - Firefox: Already implemented the new behavior - Edge: Strong public support for the new behavior. This change is guard by CallCaptureListenersAtCapturePhaseAtShadowHosts flag, which is disabled at this moment, to confirm that this CL doesn't cause any behavior change when the flag is disabled. This CL adds a wpt for new behavior, which is now marked as [Failure] in Blink. After this CL lands, I will flip the flag in a follow-up CL, with rebasing a very few existing tests. BUG=883650 Change-Id: I29938840aed4f3430d8b749cd4843176b8668b5d Reviewed-on: https://chromium-review.googlesource.com/1212255 Commit-Queue: Hayato Ito <hayato@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#591939} -- wpt-commits: 9d63cfd82f428a999fb3cacffb2f940faa6a6b64 wpt-pr: 13002
- Loading branch information
1 parent
ebb6385
commit 528b7a8
Showing
3 changed files
with
81 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
testing/web-platform/tests/shadow-dom/event-dispatch-order.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<title>Shadow DOM: event dispatch order for capture and non-capture listerns at a shadow host</title> | ||
<meta name="author" title="Hayato Ito" href="mailto:hayato@google.com"> | ||
<link rel="help" href="https://github.com/whatwg/dom/issues/685"> | ||
<link rel="help" href="https://github.com/whatwg/dom/pull/686"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="resources/shadow-dom.js"></script> | ||
<div id=host> | ||
<template id=shadowroot data-mode=open> | ||
<div id=target></div> | ||
</template> | ||
</div> | ||
<script> | ||
test(() => { | ||
let nodes = createTestTree(host); | ||
let log = dispatchEventWithLog(nodes, nodes.target, | ||
new Event('my-event', { bubbles: true, composed: true }), | ||
{ capture: true }); | ||
let path = ['target', 'shadowroot', 'host']; | ||
assert_event_path_equals(log, | ||
[['host', 'host', null, path, 'capture'], | ||
['shadowroot', 'target', null, path, 'capture'], | ||
['target', 'target', null, path, 'capture'], | ||
['target', 'target', null, path, 'non-capture'], | ||
['shadowroot', 'target', null, path, 'non-capture'], | ||
['host', 'host', null, path, 'non-capture'], | ||
]); | ||
}, 'Event dispatch order: capture listerns should be called in capturing phase at a shadow host'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters