Move OptionList to template class [chromium/src : main]

0 views
Skip to first unread message

Joey Arhar (Gerrit)

unread,
May 6, 2026, 5:28:40 AM (6 days ago) May 6
to Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com

Joey Arhar voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention set is empty
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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
Gerrit-Change-Number: 7809505
Gerrit-PatchSet: 2
Gerrit-Owner: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-Comment-Date: Wed, 06 May 2026 09:28:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
May 7, 2026, 2:54:16 PM (5 days ago) May 7
to David Baron, Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com
Attention needed from Joey Arhar

David Baron added 3 comments

File third_party/blink/renderer/core/html/forms/html_option_element.h
Line 87, Patchset 4 (Latest): HTMLSelectElement* OwnerElement() const { return nearest_ancestor_select_; }
David Baron . unresolved

This seems less than ideal -- having `OwnerElement` paired with `OwnerDataListElement` seems a bit confusing. I think it would be nice to still write `OwnerSelectElement` at the bulk of the callers spread around the codebase.

I can see two options for how to do this:
(1) just add a third method like `OwnerElementForList` or maybe just `OwnerElement`, and only use it in the `OptionList` code, or
(2) make the method an additional template parameter to `ElementList`
File third_party/blink/renderer/core/html/forms/option_list.h
Line 72, Patchset 4 (Latest):template <typename OwnerType, typename T>
David Baron . unresolved

here (and above) does it make sense to use `ItemType` rather than just `T`?

Line 16, Patchset 4 (Latest):enum class ElementListIteratorStartingPoint {
David Baron . unresolved

Is there a reason this needs to move outside the `ElementListIterator` class?

(Is it fixing something that could have been fixed by adding the `typename` keyword someplace?)

Open in Gerrit

Related details

Attention is currently required from:
  • Joey Arhar
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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
    Gerrit-Change-Number: 7809505
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: Joey Arhar <jar...@chromium.org>
    Gerrit-Comment-Date: Thu, 07 May 2026 18:54:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joey Arhar (Gerrit)

    unread,
    May 7, 2026, 4:12:56 PM (5 days ago) May 7
    to David Baron, Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com
    Attention needed from David Baron

    Joey Arhar added 3 comments

    File third_party/blink/renderer/core/html/forms/html_option_element.h
    Line 87, Patchset 4 (Latest): HTMLSelectElement* OwnerElement() const { return nearest_ancestor_select_; }
    David Baron . unresolved

    This seems less than ideal -- having `OwnerElement` paired with `OwnerDataListElement` seems a bit confusing. I think it would be nice to still write `OwnerSelectElement` at the bulk of the callers spread around the codebase.

    I can see two options for how to do this:
    (1) just add a third method like `OwnerElementForList` or maybe just `OwnerElement`, and only use it in the `OptionList` code, or
    (2) make the method an additional template parameter to `ElementList`
    Joey Arhar

    I renamed OwnerElement to OwnerElementForList, I kind of liked that better than having duplicate methods although maybe its harder to read in other places now

    File third_party/blink/renderer/core/html/forms/option_list.h
    Line 72, Patchset 4 (Latest):template <typename OwnerType, typename T>
    David Baron . resolved

    here (and above) does it make sense to use `ItemType` rather than just `T`?

    Joey Arhar

    Done

    Line 16, Patchset 4 (Latest):enum class ElementListIteratorStartingPoint {
    David Baron . unresolved

    Is there a reason this needs to move outside the `ElementListIterator` class?

    (Is it fixing something that could have been fixed by adding the `typename` keyword someplace?)

    Joey Arhar

    it was because i had to add template arguments to usages of the class namespace in other places so I thought it would be better to just move it outside of the class, but i moved it back in and added templates arguments to the other references to make it work

    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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
    Gerrit-Change-Number: 7809505
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joey Arhar <jar...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-Attention: David Baron <dba...@chromium.org>
    Gerrit-Comment-Date: Thu, 07 May 2026 20:12:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Baron <dba...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Baron (Gerrit)

    unread,
    May 11, 2026, 1:06:09 PM (yesterday) May 11
    to David Baron, Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com
    Attention needed from Joey Arhar

    David Baron voted and added 2 comments

    Votes added by David Baron

    Code-Review+1

    2 comments

    File third_party/blink/renderer/core/html/forms/html_option_element.h
    Line 87, Patchset 4: HTMLSelectElement* OwnerElement() const { return nearest_ancestor_select_; }
    David Baron . resolved

    This seems less than ideal -- having `OwnerElement` paired with `OwnerDataListElement` seems a bit confusing. I think it would be nice to still write `OwnerSelectElement` at the bulk of the callers spread around the codebase.

    I can see two options for how to do this:
    (1) just add a third method like `OwnerElementForList` or maybe just `OwnerElement`, and only use it in the `OptionList` code, or
    (2) make the method an additional template parameter to `ElementList`
    Joey Arhar

    I renamed OwnerElement to OwnerElementForList, I kind of liked that better than having duplicate methods although maybe its harder to read in other places now

    David Baron

    OK, not quite what I was hoping for but I guess it's okay. (I'd have preferred just having duplicate one-line methods so the bulk of the callers could still say `OwnerSelectElement`.)

    File third_party/blink/renderer/core/html/forms/option_list.h
    Line 16, Patchset 4:enum class ElementListIteratorStartingPoint {
    David Baron . resolved

    Is there a reason this needs to move outside the `ElementListIterator` class?

    (Is it fixing something that could have been fixed by adding the `typename` keyword someplace?)

    Joey Arhar

    it was because i had to add template arguments to usages of the class namespace in other places so I thought it would be better to just move it outside of the class, but i moved it back in and added templates arguments to the other references to make it work

    David Baron

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joey Arhar
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement 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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
      Gerrit-Change-Number: 7809505
      Gerrit-PatchSet: 6
      Gerrit-Owner: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Joey Arhar <jar...@chromium.org>
      Gerrit-Comment-Date: Mon, 11 May 2026 17:06:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Joey Arhar <jar...@chromium.org>
      Comment-In-Reply-To: David Baron <dba...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joey Arhar (Gerrit)

      unread,
      May 11, 2026, 6:38:30 PM (19 hours ago) May 11
      to David Baron, Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com

      Joey Arhar added 1 comment

      File third_party/blink/renderer/core/html/forms/html_option_element.h
      Line 87, Patchset 4: HTMLSelectElement* OwnerElement() const { return nearest_ancestor_select_; }
      David Baron . resolved

      This seems less than ideal -- having `OwnerElement` paired with `OwnerDataListElement` seems a bit confusing. I think it would be nice to still write `OwnerSelectElement` at the bulk of the callers spread around the codebase.

      I can see two options for how to do this:
      (1) just add a third method like `OwnerElementForList` or maybe just `OwnerElement`, and only use it in the `OptionList` code, or
      (2) make the method an additional template parameter to `ElementList`
      Joey Arhar

      I renamed OwnerElement to OwnerElementForList, I kind of liked that better than having duplicate methods although maybe its harder to read in other places now

      David Baron

      OK, not quite what I was hoping for but I guess it's okay. (I'd have preferred just having duplicate one-line methods so the bulk of the callers could still say `OwnerSelectElement`.)

      Joey Arhar

      ok, i made duplicate methods and reverted changes which renamed from ownerselectelement to ownerelementforlist

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement 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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
      Gerrit-Change-Number: 7809505
      Gerrit-PatchSet: 6
      Gerrit-Owner: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Comment-Date: Mon, 11 May 2026 22:38:19 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Baron (Gerrit)

      unread,
      9:42 AM (4 hours ago) 9:42 AM
      to David Baron, Kevin Babbitt, (Julie)Jeongeun Kim, Menard, Alexis, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, apavlo...@chromium.org, blink-rev...@chromium.org, lucasrada...@google.com, josiah...@chromium.org, dtseng...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, yuzo+...@chromium.org, abigailbk...@google.com, nektar...@chromium.org, kyungjunle...@google.com, blink-re...@chromium.org, francisjp...@google.com
      Attention needed from Joey Arhar

      David Baron voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joey Arhar
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement 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: I18ec8f4f45d358ce9cea7ef82c7feca0d57118e3
      Gerrit-Change-Number: 7809505
      Gerrit-PatchSet: 7
      Gerrit-Owner: Joey Arhar <jar...@chromium.org>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-Attention: Joey Arhar <jar...@chromium.org>
      Gerrit-Comment-Date: Tue, 12 May 2026 13:41:59 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages