Restrict open-on-interest for <menuitem>s in <menubar>. [chromium/src : main]

0 views
Skip to first unread message

David Baron (Gerrit)

unread,
Mar 5, 2026, 3:31:46 PM (yesterday) Mar 5
to David Baron, AI Code Reviewer, Mason Freed, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, dbaro...@chromium.org, dgroga...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

Message from David Baron

Set Ready For Review

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
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
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: I7132c8a2734dadccb659aa73471dbdadcdcf7be3
Gerrit-Change-Number: 7633506
Gerrit-PatchSet: 9
Gerrit-Owner: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Thu, 05 Mar 2026 20:31:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
11:40 AM (12 hours ago) 11:40 AM
to David Baron, AI Code Reviewer, Mason Freed, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, dbaro...@chromium.org, dgroga...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

David Baron added 2 comments

Patchset-level comments
File-level comment, Patchset 8:
David Baron . resolved

I'm curious if you think this is too weird -- especially in the context of what we're going to need to standandize. (I'm not quite sure how many of the details of the interest stuff that this is modifying are standardized versus how many are not.)

David Baron

Done

File third_party/blink/renderer/core/dom/element.cc
Line 12379, Patchset 8: auto is_open_menuitem = [](Node& n) -> bool {
AI Code Reviewer . resolved

nit: Inconsistent variable naming. The variable 'menuitem' should be named 'menu_item' to match the convention used in the surrounding code (e.g., line 12373) and the file name 'html_menu_item_element.h'. Consider renaming the lambda 'is_open_menuitem' to 'is_menu_item_open' as well for consistency.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

David Baron

This is at least partly invalid (reordering open versus menuitem), since the lambda is definitely about "is it a menuitem and is it open" and not just "is the menuitem open". Given that the menuitem part is about whether it's a `<menuitem>` element I'm inclined to not insert the underscore.

David Baron

code in question is now gone

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
    • requirement is not satisfiedReview-Enforcement
    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: I7132c8a2734dadccb659aa73471dbdadcdcf7be3
    Gerrit-Change-Number: 7633506
    Gerrit-PatchSet: 9
    Gerrit-Owner: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Fri, 06 Mar 2026 16:40:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Comment-In-Reply-To: David Baron <dba...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Baron (Gerrit)

    unread,
    11:57 AM (11 hours ago) 11:57 AM
    to David Baron, Steinar H Gunderson, AI Code Reviewer, Mason Freed, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, dbaro...@chromium.org, dgroga...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
    Attention needed from Mason Freed

    David Baron added 1 comment

    Patchset-level comments
    File-level comment, Patchset 9 (Latest):
    David Baron . unresolved

    The single unittest failure here suggests that maybe this isn't a good idea. Though I'm pretty surprised that it's just *one* unittest that's affected. I'm curious if using `:has(> ...)` like this is something we need to avoid, or whether you think there's a reasonable path to making it allowable.

    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
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      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: I7132c8a2734dadccb659aa73471dbdadcdcf7be3
      Gerrit-Change-Number: 7633506
      Gerrit-PatchSet: 9
      Gerrit-Owner: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Steinar H Gunderson <se...@chromium.org>
      Gerrit-Attention: Mason Freed <mas...@chromium.org>
      Gerrit-Comment-Date: Fri, 06 Mar 2026 16:57:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mason Freed (Gerrit)

      unread,
      3:13 PM (8 hours ago) 3:13 PM
      to David Baron, Steinar H Gunderson, AI Code Reviewer, AyeAye, chromium...@chromium.org, blink-rev...@chromium.org, dbaro...@chromium.org, dgroga...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
      Attention needed from David Baron

      Mason Freed added 5 comments

      Patchset-level comments
      Mason Freed . resolved

      Looks good! I like this patch better than the prior approach, for sure.

      File third_party/blink/renderer/core/html/resources/html.css
      Line 2364, Patchset 9 (Latest): menubar:has(> menuitem:open) > menuitem {
      Mason Freed . unresolved

      Did we decide that the menuitem has to be a direct child?

      File third_party/blink/web_tests/external/wpt/html/semantics/menu/tentative/menuitem-implicit-interest-invoker.tentative.html
      Line 19, Patchset 9 (Latest):test needs to wait.
      Mason Freed . unresolved

      nit: perhaps `s/wait/use explicit delays` or something like that? This sounds like we need to wait to write some part of the test or something.

      Line 77, Patchset 9 (Latest): await t.step_wait(() => element.matches(":interest-source"), 2000)
      Mason Freed . unresolved

      These are very long delays - any way to shorten them?

      Also, I know step_wait multiplies by the overall test timeout, but should this test be marked with `<meta name="timeout" content="long" />`?

      Line 90, Patchset 9 (Latest): await wait_for_no_interest(t);
      Mason Freed . unresolved

      Perhaps just inline this, to avoid the temptation to use it again somewhere else?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Baron
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      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: I7132c8a2734dadccb659aa73471dbdadcdcf7be3
      Gerrit-Change-Number: 7633506
      Gerrit-PatchSet: 9
      Gerrit-Owner: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Steinar H Gunderson <se...@chromium.org>
      Gerrit-Attention: David Baron <dba...@chromium.org>
      Gerrit-Comment-Date: Fri, 06 Mar 2026 20:13:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages