[menu]: Fix toggle-menu command with light dismiss [chromium/src : main]

5 views
Skip to first unread message

Dominic Farolino (Gerrit)

unread,
Jun 16, 2025, 4:57:42 PM6/16/25
to Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

Dominic Farolino voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
Gerrit-Change-Number: 6648085
Gerrit-PatchSet: 2
Gerrit-Owner: Dominic Farolino <d...@chromium.org>
Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Jun 2025 20:57:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Di Zhang (Gerrit)

unread,
Jun 16, 2025, 7:03:44 PM6/16/25
to Dominic Farolino, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Dominic Farolino and Mason Freed

Di Zhang added 1 comment

File third_party/blink/renderer/core/html/html_element.cc
Line 2117, Patchset 2 (Latest): ? DynamicTo<HTMLElement>(menu_item_element->commandForElement())
Di Zhang . unresolved

I think it is safer to use `DynamicTo<HTMLMenuListElement>(menu_item_element->commandForElement())`.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominic Farolino
  • Mason Freed
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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
    Gerrit-Change-Number: 6648085
    Gerrit-PatchSet: 2
    Gerrit-Owner: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Di Zhang <dizh...@chromium.org>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Mon, 16 Jun 2025 23:03:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominic Farolino (Gerrit)

    unread,
    Jun 17, 2025, 10:53:29 AM6/17/25
    to Di Zhang, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Di Zhang and Mason Freed

    Dominic Farolino voted and added 1 comment

    Votes added by Dominic Farolino

    Commit-Queue+1

    1 comment

    File third_party/blink/renderer/core/html/html_element.cc
    Line 2117, Patchset 2: ? DynamicTo<HTMLElement>(menu_item_element->commandForElement())
    Di Zhang . resolved

    I think it is safer to use `DynamicTo<HTMLMenuListElement>(menu_item_element->commandForElement())`.

    Dominic Farolino

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Di Zhang
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
    Gerrit-Change-Number: 6648085
    Gerrit-PatchSet: 3
    Gerrit-Owner: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Di Zhang <dizh...@chromium.org>
    Gerrit-Attention: Di Zhang <dizh...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 17 Jun 2025 14:53:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominic Farolino (Gerrit)

    unread,
    Jun 17, 2025, 10:57:10 AM6/17/25
    to Di Zhang, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Di Zhang and Mason Freed

    Dominic Farolino voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Di Zhang
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
    Gerrit-Change-Number: 6648085
    Gerrit-PatchSet: 4
    Gerrit-Owner: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Di Zhang <dizh...@chromium.org>
    Gerrit-Attention: Di Zhang <dizh...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 17 Jun 2025 14:57:04 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Di Zhang (Gerrit)

    unread,
    Jun 17, 2025, 11:11:07 AM6/17/25
    to Dominic Farolino, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Dominic Farolino and Mason Freed

    Di Zhang voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
    Gerrit-Change-Number: 6648085
    Gerrit-PatchSet: 4
    Gerrit-Owner: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 17 Jun 2025 15:10:56 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Mason Freed (Gerrit)

    unread,
    Jun 18, 2025, 5:36:31 PM6/18/25
    to Dominic Farolino, Di Zhang, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Dominic Farolino

    Mason Freed added 5 comments

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Mason Freed . resolved

    Looks good, other than the target-is-menulist restriction question.

    File third_party/blink/renderer/core/html/html_element.cc
    Line 2113, Patchset 4 (Latest): const HTMLMenuItemElement* menu_item_element =
    Mason Freed . unresolved

    nit: `auto*` is easier to read here

    Line 2113, Patchset 4 (Latest): const HTMLMenuItemElement* menu_item_element =
    Mason Freed . unresolved

    nit: maybe just `menu_item`?

    Line 2116, Patchset 4 (Latest): menu_item_element ? DynamicTo<HTMLMenuListElement>(
    Mason Freed . unresolved

    I think it should likely be "legal" to do this:

    ```
    <menuitem command=show-popover commandfor=foo></menuitem>
    <div popover id=foo></div>
    ```

    I.e. not sure why the target has to be a menulist?

    File third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menuitem-activate.html
    File-level comment, Patchset 4 (Latest):
    Mason Freed . unresolved

    If you agree with my comment above, it'd be good to add a test that shows you can do `command=show-popover` from a `<menuitem>`.

    I also think, and I've mentioned this to Di (so double-check she hasn't already done it), that it'd be good to make a test where the entire `<menulist>` resides in an open popover. Menus should work just fine within a popover, and e.g. the outer popover shouldn't be inadvertently closed at any point.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominic Farolino
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
      Gerrit-Change-Number: 6648085
      Gerrit-PatchSet: 4
      Gerrit-Owner: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
      Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Dominic Farolino <d...@chromium.org>
      Gerrit-Comment-Date: Wed, 18 Jun 2025 21:36:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Di Zhang (Gerrit)

      unread,
      Jun 18, 2025, 6:54:46 PM6/18/25
      to Dominic Farolino, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Dominic Farolino

      Di Zhang added 1 comment

      File third_party/blink/renderer/core/html/html_element.cc
      Line 2116, Patchset 4 (Latest): menu_item_element ? DynamicTo<HTMLMenuListElement>(
      Mason Freed . unresolved

      I think it should likely be "legal" to do this:

      ```
      <menuitem command=show-popover commandfor=foo></menuitem>
      <div popover id=foo></div>
      ```

      I.e. not sure why the target has to be a menulist?

      Di Zhang

      I suggested this restriction. I thought about it more and agree with Mason, menuitem should support all valid commands.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dominic Farolino
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
      Gerrit-Change-Number: 6648085
      Gerrit-PatchSet: 4
      Gerrit-Owner: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
      Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Dominic Farolino <d...@chromium.org>
      Gerrit-Comment-Date: Wed, 18 Jun 2025 22:54:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dominic Farolino (Gerrit)

      unread,
      Jun 23, 2025, 12:23:50 PM6/23/25
      to Di Zhang, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Mason Freed

      Dominic Farolino voted and added 3 comments

      Votes added by Dominic Farolino

      Commit-Queue+1

      3 comments

      File third_party/blink/renderer/core/html/html_element.cc
      Line 2113, Patchset 4: const HTMLMenuItemElement* menu_item_element =
      Mason Freed . resolved

      nit: `auto*` is easier to read here

      Dominic Farolino

      I suppose. I just hate `auto`! Done, though.

      Line 2113, Patchset 4: const HTMLMenuItemElement* menu_item_element =
      Mason Freed . resolved

      nit: maybe just `menu_item`?

      Dominic Farolino

      Done

      Line 2116, Patchset 4: menu_item_element ? DynamicTo<HTMLMenuListElement>(
      Mason Freed . resolved

      I think it should likely be "legal" to do this:

      ```
      <menuitem command=show-popover commandfor=foo></menuitem>
      <div popover id=foo></div>
      ```

      I.e. not sure why the target has to be a menulist?

      Di Zhang

      I suggested this restriction. I thought about it more and agree with Mason, menuitem should support all valid commands.

      Dominic Farolino

      Yeah this seems like a good idea. In my head I wasn't considering the other commands. I'll loosen this and add a test.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mason Freed
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
      Gerrit-Change-Number: 6648085
      Gerrit-PatchSet: 5
      Gerrit-Owner: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
      Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Comment-Date: Mon, 23 Jun 2025 16:23:45 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>
      Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Dominic Farolino (Gerrit)

      unread,
      Jun 23, 2025, 1:18:35 PM6/23/25
      to Di Zhang, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Mason Freed

      Dominic Farolino voted and added 1 comment

      Votes added by Dominic Farolino

      Commit-Queue+1

      1 comment

      File third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menuitem-activate.html
      File-level comment, Patchset 4:
      Mason Freed . resolved

      If you agree with my comment above, it'd be good to add a test that shows you can do `command=show-popover` from a `<menuitem>`.

      I also think, and I've mentioned this to Di (so double-check she hasn't already done it), that it'd be good to make a test where the entire `<menulist>` resides in an open popover. Menus should work just fine within a popover, and e.g. the outer popover shouldn't be inadvertently closed at any point.

      Dominic Farolino

      I'll add a TODO on my list to add this kind of test after this CL, if that'a alright with you.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mason Freed
      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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
      Gerrit-Change-Number: 6648085
      Gerrit-PatchSet: 5
      Gerrit-Owner: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
      Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Comment-Date: Mon, 23 Jun 2025 17:18:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
      satisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      Jun 23, 2025, 4:55:04 PM6/23/25
      to Dominic Farolino, Di Zhang, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Dominic Farolino

      Mason Freed voted and added 3 comments

      Votes added by Mason Freed

      Code-Review+1

      3 comments

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Mason Freed . resolved

      LGTM, thanks

      File third_party/blink/renderer/core/html/html_element.cc
      Line 2113, Patchset 4: const HTMLMenuItemElement* menu_item_element =
      Mason Freed . unresolved

      nit: `auto*` is easier to read here

      Dominic Farolino

      I suppose. I just hate `auto`! Done, though.

      Mason Freed

      Why do you hate `auto`, out of curiosity? It can cause readability problems in some cases, but I don't think that's true when the line is something like:

      `auto* foo = DynamicTo<SomeReallyGiantTypeNameThatWouldAppearTwice>(bar);`

      File third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menuitem-activate.html
      Mason Freed . resolved

      If you agree with my comment above, it'd be good to add a test that shows you can do `command=show-popover` from a `<menuitem>`.

      I also think, and I've mentioned this to Di (so double-check she hasn't already done it), that it'd be good to make a test where the entire `<menulist>` resides in an open popover. Menus should work just fine within a popover, and e.g. the outer popover shouldn't be inadvertently closed at any point.

      Dominic Farolino

      I'll add a TODO on my list to add this kind of test after this CL, if that'a alright with you.

      Mason Freed

      Ack

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dominic Farolino
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement 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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
        Gerrit-Change-Number: 6648085
        Gerrit-PatchSet: 5
        Gerrit-Owner: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Attention: Dominic Farolino <d...@chromium.org>
        Gerrit-Comment-Date: Mon, 23 Jun 2025 20:54:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Dominic Farolino <d...@chromium.org>
        Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Dominic Farolino (Gerrit)

        unread,
        Jun 24, 2025, 9:50:12 AM6/24/25
        to Mason Freed, Di Zhang, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

        Dominic Farolino voted and added 1 comment

        Votes added by Dominic Farolino

        Commit-Queue+2

        1 comment

        File third_party/blink/renderer/core/html/html_element.cc
        Line 2113, Patchset 4: const HTMLMenuItemElement* menu_item_element =
        Mason Freed . resolved

        nit: `auto*` is easier to read here

        Dominic Farolino

        I suppose. I just hate `auto`! Done, though.

        Mason Freed

        Why do you hate `auto`, out of curiosity? It can cause readability problems in some cases, but I don't think that's true when the line is something like:

        `auto* foo = DynamicTo<SomeReallyGiantTypeNameThatWouldAppearTwice>(bar);`

        Dominic Farolino

        Yeah in that example it makes sense. I hate it in the cases where it causes readability problems, and I just remain consistent with that at all times, even at the expense of verbosity. But I think my policy just doesn't make sense heh.

        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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
        Gerrit-Change-Number: 6648085
        Gerrit-PatchSet: 5
        Gerrit-Owner: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Jun 2025 13:50:07 +0000
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jun 24, 2025, 9:53:45 AM6/24/25
        to Dominic Farolino, Mason Freed, Di Zhang, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        [menu]: Fix toggle-menu command with light dismiss

        `NearestTargetPopoverForInvoker()` finds the nearest target popover for
        a given popover invoker that is a form control or button element.
        Before this CL, this algorithm didn't consider HTMLMenuItemElements as
        possible popover invokers, meaning it never returned relevant opened
        HTMLMenuListElement popovers.

        This CL updates this algorithm to consider HTMLMenuItemElement as a
        popover invoker, and return its associated target menulist as a
        popover. This corrects `FindTopmostRelatedPopover()`, which makes light
        dismiss for clicks aimed at <menuitem>s work the same as <button>s.

        Concretely, this ensures we do not double-activate a menuitem when we
        click it and its popover is open. This fixes the behavior of the
        `toggle-menu` command, ensuring it works the same as `toggle-popover`
        on buttons/traditional popovers.

        R=masonf
        Bug: 406566432
        Change-Id: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
        Reviewed-by: Di Zhang <dizh...@chromium.org>
        Reviewed-by: Mason Freed <mas...@chromium.org>
        Commit-Queue: Dominic Farolino <d...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1477891}
        Files:
        • M third_party/blink/renderer/core/html/html_element.cc
        • M third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menubar-invoke-menulist.html
        • A third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menuitem-activate.html
        Change size: M
        Delta: 3 files changed, 121 insertions(+), 8 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Di Zhang, +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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
        Gerrit-Change-Number: 6648085
        Gerrit-PatchSet: 6
        Gerrit-Owner: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        open
        diffy
        satisfied_requirement

        Blink W3C Test Autoroller (Gerrit)

        unread,
        Jun 24, 2025, 10:51:39 AM6/24/25
        to Dominic Farolino, Chromium LUCI CQ, Mason Freed, Di Zhang, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

        Message from Blink W3C Test Autoroller

        The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/53352

        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: Iaa76d41e9f4cfe73ee49e4924de0b07165f679dc
        Gerrit-Change-Number: 6648085
        Gerrit-PatchSet: 6
        Gerrit-Owner: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
        Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Jun 2025 14:51:34 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages