Make invocationTargetInShadowTree determined before listener invocation [chromium/src : main]

0 views
Skip to first unread message

YeongHan Kim (Gerrit)

unread,
Sep 23, 2025, 11:13:03 AM (13 days ago) Sep 23
to Kentaro Hara, Mason Freed, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from Kentaro Hara and Mason Freed

YeongHan Kim added 2 comments

Patchset-level comments
File-level comment, Patchset 10 (Latest):
YeongHan Kim . resolved

Please take a look.
Thank you!

haraken@ for bindings/
masonf@ for core/dom/

File third_party/blink/web_tests/external/wpt/shadow-dom/event-post-dispatch-expected.txt
Line 3, Patchset 6: assert_equals: Target should not have been cleared expected Element node <trala></trala> but got null
YeongHan Kim . resolved

This test was already failing regardless of this CL.
This CL improved the test anyway so that some parts now pass, which changed the points of failure.
Therefore, I simply updated the expected.txt.

I'll fix this test in follow-up patch.

Open in Gerrit

Related details

Attention is currently required from:
  • Kentaro Hara
  • Mason Freed
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
Gerrit-Change-Number: 6966287
Gerrit-PatchSet: 10
Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Sep 2025 15:12:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Sep 23, 2025, 11:47:19 AM (13 days ago) Sep 23
to YeongHan Kim, Kentaro Hara, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from Kentaro Hara and YeongHan Kim

Mason Freed voted and added 2 comments

Votes added by Mason Freed

Code-Review+1

2 comments

Patchset-level comments
Mason Freed . resolved

LGTM!

File third_party/blink/renderer/core/dom/events/event.h
Line 389, Patchset 10 (Latest): bool invocation_target_in_shadow_tree_ : 1;
Mason Freed . unresolved

nit: move this up next to the other `bool`s, so it packs into a word.

Open in Gerrit

Related details

Attention is currently required from:
  • Kentaro Hara
  • YeongHan Kim
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
Gerrit-Change-Number: 6966287
Gerrit-PatchSet: 10
Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: YeongHan Kim <soosu...@gmail.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Sep 2025 15:47:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

YeongHan Kim (Gerrit)

unread,
Sep 23, 2025, 11:52:42 AM (13 days ago) Sep 23
to Mason Freed, Kentaro Hara, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from Kentaro Hara and Mason Freed

YeongHan Kim added 2 comments

Patchset-level comments
File-level comment, Patchset 10:
YeongHan Kim . resolved

Thank you for your review!

File third_party/blink/renderer/core/dom/events/event.h
Line 389, Patchset 10: bool invocation_target_in_shadow_tree_ : 1;
Mason Freed . resolved

nit: move this up next to the other `bool`s, so it packs into a word.

YeongHan Kim

Done!

Open in Gerrit

Related details

Attention is currently required from:
  • Kentaro Hara
  • Mason Freed
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
Gerrit-Change-Number: 6966287
Gerrit-PatchSet: 11
Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Sep 2025 15:52:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Sep 24, 2025, 1:25:54 PM (12 days ago) Sep 24
to YeongHan Kim, Kentaro Hara, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from Kentaro Hara and YeongHan Kim

Mason Freed voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Kentaro Hara
  • YeongHan Kim
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
Gerrit-Change-Number: 6966287
Gerrit-PatchSet: 11
Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: YeongHan Kim <soosu...@gmail.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Sep 2025 17:25:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

YeongHan Kim (Gerrit)

unread,
Sep 24, 2025, 2:18:26 PM (11 days ago) Sep 24
to Mason Freed, Kentaro Hara, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from Kentaro Hara

YeongHan Kim added 1 comment

Patchset-level comments
File-level comment, Patchset 11 (Latest):
YeongHan Kim . resolved

haraken@ for bindings/
Gentle ping on this CL!

Open in Gerrit

Related details

Attention is currently required from:
  • Kentaro Hara
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
Gerrit-Change-Number: 6966287
Gerrit-PatchSet: 11
Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Kentaro Hara <har...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Sep 2025 18:18:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kentaro Hara (Gerrit)

unread,
Sep 24, 2025, 7:44:38 PM (11 days ago) Sep 24
to YeongHan Kim, Mason Freed, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org
Attention needed from YeongHan Kim

Kentaro Hara voted and added 1 comment

Votes added by Kentaro Hara

Code-Review+1

1 comment

Patchset-level comments
Kentaro Hara . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • YeongHan Kim
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
    Gerrit-Change-Number: 6966287
    Gerrit-PatchSet: 11
    Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: YeongHan Kim <soosu...@gmail.com>
    Gerrit-Comment-Date: Wed, 24 Sep 2025 23:44:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    YeongHan Kim (Gerrit)

    unread,
    Sep 25, 2025, 1:16:55 AM (11 days ago) Sep 25
    to Kentaro Hara, Mason Freed, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org

    YeongHan Kim voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
    Gerrit-Change-Number: 6966287
    Gerrit-PatchSet: 11
    Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Comment-Date: Thu, 25 Sep 2025 05:16:45 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Sep 25, 2025, 2:22:17 AM (11 days ago) Sep 25
    to YeongHan Kim, Kentaro Hara, Mason Freed, AyeAye, chromium...@chromium.org, Raphael Kubo da Costa, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, dtapuska+...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Make invocationTargetInShadowTree determined before listener invocation

    According to spec[1], invocationTargetInShadowTree should be determined
    before calling the listener and then used during the invoke step[2].
    Chrome does not comply with the spec. Instead, it uses
    IsInShadowTree() to check whether the event is inside a shadow tree,
    and this check is performed during the invoke step.
    But this does not behave correctly when a node moves during the
    listener call, as the shadow tree check is performed based on the moved
    node.
    So, this patch fixes the bug by saving invocationTargetInShadowTree
    before calling the listener and using it.

    [1] https://dom.spec.whatwg.org/#concept-event-path-append
    [2] https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
    Bug: 41408360
    Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
    Reviewed-by: Kentaro Hara <har...@chromium.org>
    Commit-Queue: YeongHan Kim <soosu...@gmail.com>
    Reviewed-by: Mason Freed <mas...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1520380}
    Files:
    • M third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
    • M third_party/blink/renderer/core/dom/events/event.h
    • M third_party/blink/renderer/core/dom/events/node_event_context.cc
    • M third_party/blink/renderer/core/dom/events/node_event_context.h
    • M third_party/blink/renderer/platform/runtime_enabled_features.json5
    • D third_party/blink/web_tests/external/wpt/dom/events/event-global-extra.window-expected.txt
    • M third_party/blink/web_tests/external/wpt/shadow-dom/event-post-dispatch-expected.txt
    Change size: S
    Delta: 7 files changed, 30 insertions(+), 8 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Kentaro Hara, +1 by Mason Freed
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4893440e76adb45949fa998edc5e8ff975d811f5
    Gerrit-Change-Number: 6966287
    Gerrit-PatchSet: 12
    Gerrit-Owner: YeongHan Kim <soosu...@gmail.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Kentaro Hara <har...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: YeongHan Kim <soosu...@gmail.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages