New issue
Advanced search Search tips

Issue 883650 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Align Blink's event dispatch behavior with https://github.com/whatwg/dom/issues/685

Project Member Reported by hayato@chromium.org, Sep 13

Issue description

See https://github.com/whatwg/dom/issues/685.

The discussion is on-going, however, the consensus there is:

- Capturing event listeners should be called during capturing phase for shadow hosts, instead of bubbling phase.

We have to update Blink's behavior to align with other browsers.

The most difficult part is that this change might not be Web Compatible, however, it is worth trying this change to align Blink with other browsers.

 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad

commit da8cf24a69567fbc9d2a594489d0ec0566a3d3ad
Author: Hayato Ito <hayato@chromium.org>
Date: Tue Sep 18 04:50:48 2018

Call capture event listeners in capturing phase at shadow hosts

Chromestatus entry is here: https://www.chromestatus.com/feature/5636327009681408

Per the discussion of https://github.com/whatwg/dom/issues/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}
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/event-dispatch-order.tentative.html
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/resources/shadow-dom.js
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/dom/events/event.cc
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/dom/events/event.h
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/dom/events/event_dispatcher.cc
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/dom/events/event_target.cc
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/events/registered_event_listener.cc
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/core/events/registered_event_listener.h
[modify] https://crrev.com/da8cf24a69567fbc9d2a594489d0ec0566a3d3ad/third_party/blink/renderer/platform/runtime_enabled_features.json5

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 18

Status: Fixed (was: Started)

Sign in to add a comment