Refactor back/forward button to support WebUI [chromium/src : main]

0 views
Skip to first unread message

Paul Jensen (Gerrit)

unread,
Jan 23, 2026, 9:20:01 AMJan 23
to Youseff Bourouphel, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
Attention needed from Youseff Bourouphel

Paul Jensen added 12 comments

File chrome/browser/ui/views/toolbar/toolbar_view.cc
Line 287, Patchset 31 (Latest):
Paul Jensen . unresolved

extra new line?

Line 328, Patchset 31 (Latest): if (use_webui_back_forward || use_webui_reload) {
Paul Jensen . unresolved

I think this should be cleaned up by rebasing on https://chromium-review.googlesource.com/c/chromium/src/+/7507149

Line 336, Patchset 31 (Latest): back_->SetTag(IDC_BACK);
forward_->SetTag(IDC_FORWARD);
Paul Jensen . unresolved

this logic seems duplicated with the lines on 318 and 322. Can we dedup and move down to line 493 with the other tag setting logic?

Line 683, Patchset 31 (Latest): if (back_) {
Paul Jensen . unresolved

do we need the null checks? did the old code handle null controls?

Line 688, Patchset 31 (Latest): if (id == IDC_FORWARD) {
Paul Jensen . unresolved
I'd recommend either:
1. removing BackForwardControl::GetTag(), or
2. changing these two if statements to code more like the end of this method like:
```
const std::array<BackForwardControl*, 2> kButtons{back_, forward_};
auto it = std::ranges::find(kButtons, id, &BackForwardControl::GetTag);
if (it != kButtons.end()) {
(*it)->SetEnabled(enabled);
}
```
File chrome/browser/ui/webui/webui_toolbar/webui_toolbar.mojom
Line 48, Patchset 8: Back(array<ClickDispositionFlag> flags);
Paul Jensen . resolved

FYI we're moving away from ClickDispositionFlag as per https://chromium-review.googlesource.com/c/chromium/src/+/7405167/10/components/browser_apis/browser_controls/browser_controls_api.mojom#42

Paul Jensen

We wound up moving back to ClickDispositionFlag.

File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
Line 82, Patchset 31 (Latest): return features::IsWebUIReloadButtonEnabled() ||
Paul Jensen . unresolved
File chrome/common/chrome_features.h
Line 1347, Patchset 31 (Latest):// When enable, the back and forward buttons will be replaced with the a
Paul Jensen . unresolved

looks like folks generally don't add comments in this file

File chrome/common/chrome_features.cc
Line 1801, Patchset 31 (Latest):// UI reload behavior. If the renderer crashes, we will try to recover it by
Paul Jensen . unresolved

behavior behavior seems like a typo

Line 1819, Patchset 31 (Latest):
Paul Jensen . unresolved

extra new line?

Line 1826, Patchset 31 (Latest):// When enabled, the back and forward buttons will be replaced with the a
Paul Jensen . unresolved
File components/browser_apis/browser_controls/browser_controls_api.mojom
Line 37, Patchset 31 (Latest): SetBackButtonLeadingMargin(int32 margin);
Paul Jensen . unresolved
```suggestion
OnBackButtonLeadingMarginChanged(int32 margin);
```
Open in Gerrit

Related details

Attention is currently required from:
  • Youseff Bourouphel
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
Gerrit-Change-Number: 7466673
Gerrit-PatchSet: 31
Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
Gerrit-CC: Paul Jensen <paulj...@chromium.org>
Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
Gerrit-Comment-Date: Fri, 23 Jan 2026 14:19:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Youseff Bourouphel (Gerrit)

unread,
Jan 27, 2026, 1:23:43 PMJan 27
to AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
Attention needed from Paul Jensen

Youseff Bourouphel added 13 comments

File chrome/browser/resources/webui_toolbar/back_forward_button.ts
Line 47, Patchset 23: private getDisposition_(e: MouseEvent): WindowOpenDisposition {
Youseff Bourouphel . resolved

move back to click disposition

File chrome/browser/ui/views/toolbar/toolbar_view.cc
Line 287, Patchset 31:
Paul Jensen . resolved

extra new line?

Youseff Bourouphel

Done

Line 328, Patchset 31: if (use_webui_back_forward || use_webui_reload) {
Paul Jensen . resolved

I think this should be cleaned up by rebasing on https://chromium-review.googlesource.com/c/chromium/src/+/7507149

Youseff Bourouphel

Acknowledged

Line 336, Patchset 31: back_->SetTag(IDC_BACK);
forward_->SetTag(IDC_FORWARD);
Paul Jensen . resolved

this logic seems duplicated with the lines on 318 and 322. Can we dedup and move down to line 493 with the other tag setting logic?

Youseff Bourouphel

Made a helper to combine logic.

Line 683, Patchset 31: if (back_) {
Paul Jensen . resolved

do we need the null checks? did the old code handle null controls?

Youseff Bourouphel

Removed.

Line 688, Patchset 31: if (id == IDC_FORWARD) {
Paul Jensen . resolved
I'd recommend either:
1. removing BackForwardControl::GetTag(), or
2. changing these two if statements to code more like the end of this method like:
```
const std::array<BackForwardControl*, 2> kButtons{back_, forward_};
auto it = std::ranges::find(kButtons, id, &BackForwardControl::GetTag);
if (it != kButtons.end()) {
(*it)->SetEnabled(enabled);
}
```
Youseff Bourouphel

Done

File chrome/browser/ui/webui/webui_toolbar/webui_toolbar.mojom
Line 48, Patchset 8: Back(array<ClickDispositionFlag> flags);
Youseff Bourouphel

Acknowledged

File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
Line 82, Patchset 31: return features::IsWebUIReloadButtonEnabled() ||
Paul Jensen . resolved
Youseff Bourouphel

Done

File chrome/common/chrome_features.h
Line 1347, Patchset 31:// When enable, the back and forward buttons will be replaced with the a
Paul Jensen . resolved

looks like folks generally don't add comments in this file

Youseff Bourouphel

Done

File chrome/common/chrome_features.cc
Line 1801, Patchset 31:// UI reload behavior. If the renderer crashes, we will try to recover it by
Paul Jensen . resolved

behavior behavior seems like a typo

Youseff Bourouphel

Done

Line 1819, Patchset 31:
Paul Jensen . resolved

extra new line?

Youseff Bourouphel

Done

Line 1826, Patchset 31:// When enabled, the back and forward buttons will be replaced with the a
Paul Jensen . resolved
Youseff Bourouphel

Done

File components/browser_apis/browser_controls/browser_controls_api.mojom
Line 37, Patchset 31: SetBackButtonLeadingMargin(int32 margin);
Paul Jensen . resolved
```suggestion
OnBackButtonLeadingMarginChanged(int32 margin);
```
Youseff Bourouphel

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Paul Jensen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
    Gerrit-Change-Number: 7466673
    Gerrit-PatchSet: 38
    Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
    Gerrit-CC: Paul Jensen <paulj...@chromium.org>
    Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
    Gerrit-Comment-Date: Tue, 27 Jan 2026 18:23:37 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Qingxin Wu (Gerrit)

    unread,
    Jan 28, 2026, 11:09:24 AMJan 28
    to Youseff Bourouphel, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
    Attention needed from Paul Jensen and Youseff Bourouphel

    Qingxin Wu added 5 comments

    Patchset-level comments
    File-level comment, Patchset 39 (Latest):
    Qingxin Wu . resolved

    some quick comments. Will take a look later today.

    File chrome/browser/resources/webui_toolbar/webui_toolbar.html
    Line 11, Patchset 39 (Latest):</html>
    Qingxin Wu . unresolved

    add back new line at end of file.

    File chrome/browser/ui/ui_features.h
    Line 383, Patchset 39 (Latest):bool IsWebUIBackForwardButtonEnabled();
    Qingxin Wu . unresolved

    probably a good idea to just pull all the feature flag changes to a separate CL, like https://crrev.com/c/7523686

    File chrome/browser/ui/views/toolbar/toolbar_view.cc
    Line 692, Patchset 39 (Latest):void ToolbarView::EnabledStateChangedForCommand(int id, bool enabled) {
    Qingxin Wu . unresolved

    I submitted a CL that fixed a bug in this function. After rebasing, I think you don't need any change to this function.

    File chrome/common/chrome_features.cc
    Line 1840, Patchset 39 (Latest):BASE_FEATURE(kWebUIBackForwardButton, base::FEATURE_DISABLED_BY_DEFAULT);
    Qingxin Wu . unresolved

    add a comment for it

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Paul Jensen
    • Youseff Bourouphel
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
      Gerrit-Change-Number: 7466673
      Gerrit-PatchSet: 39
      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
      Gerrit-CC: Qingxin Wu <qing...@google.com>
      Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-Comment-Date: Wed, 28 Jan 2026 16:09:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Paul Jensen (Gerrit)

      unread,
      Jan 28, 2026, 11:12:29 AMJan 28
      to Youseff Bourouphel, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
      Attention needed from Youseff Bourouphel

      Paul Jensen added 11 comments

      File chrome/browser/resources/webui_toolbar/app.css
      Line 11, Patchset 39 (Latest): display: flex;
      Paul Jensen . unresolved

      what's the goal of this change?

      File chrome/browser/resources/webui_toolbar/app.ts
      Line 41, Patchset 39 (Latest): protected accessor backVisible_: boolean = true;
      Paul Jensen . unresolved

      do we need this one?

      File chrome/browser/resources/webui_toolbar/back_forward_button.ts
      Line 47, Patchset 39 (Latest): private getFlags_(e: MouseEvent): ClickDispositionFlag[] {
      Paul Jensen . unresolved

      can we share this method with the ReloadButton's generateFlags() maybe in a `toolbar_button.ts`?

      File chrome/browser/ui/views/toolbar/back_forward_control.h
      Line 1, Patchset 39 (Latest):// Copyright 2026 The Chromium Authors
      Paul Jensen . unresolved

      perhaps make this the second CL

      File chrome/browser/ui/views/toolbar/toolbar_view.cc
      Line 192, Patchset 39 (Latest): back->AsView() ? back->AsView()->GetID() : VIEW_ID_BACK_BUTTON;
      Paul Jensen . unresolved

      Can we add a BackForwardControl::GetID() method and change this whole method to be a for-loop that does the same thing for both buttons? If it's small, then we could remove this method and put the new for-loop right before the existing for-loop.

      Line 341, Patchset 39 (Latest): if (use_webui_back_forward || use_webui_reload) {
      Paul Jensen . unresolved

      I think this should get cleaned up if you fix the merge conflicts

      File chrome/browser/ui/views/toolbar/webui_back_forward_control.h
      Line 1, Patchset 39 (Latest):// Copyright 2026 The Chromium Authors
      Paul Jensen . unresolved

      this could be third CL

      File chrome/common/chrome_features.h
      Line 1364, Patchset 39 (Latest):COMPONENT_EXPORT(CHROME_FEATURES)
      Paul Jensen . unresolved

      this would be first CL

      File components/browser_apis/browser_controls/browser_controls_api.mojom
      Line 34, Patchset 39 (Latest): OnBackForwardStatusChanged(BackForwardState state);
      Paul Jensen . unresolved
      ```suggestion
      OnBackForwardStatusChanged(ButtonState back_state, ButtonState forward_state);
      ```
      File components/browser_apis/browser_controls/browser_controls_api_data_model.mojom
      Line 27, Patchset 39 (Latest):struct BackForwardState {
      Paul Jensen . unresolved

      maybe change this to just ButtonState, also see what Qingxin's CL uses, maybe combine with that

      File ui/webui/resources/cr_elements/cr_icons_lit.css
      Line 14, Patchset 39 (Latest):.icon-arrow-forward {
      Paul Jensen . unresolved

      could we use the back icon flipped?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Youseff Bourouphel
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
      Gerrit-Change-Number: 7466673
      Gerrit-PatchSet: 39
      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
      Gerrit-CC: Qingxin Wu <qing...@google.com>
      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-Comment-Date: Wed, 28 Jan 2026 16:12:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qingxin Wu (Gerrit)

      unread,
      Jan 28, 2026, 11:36:30 AMJan 28
      to Youseff Bourouphel, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
      Attention needed from Youseff Bourouphel

      Qingxin Wu added 5 comments

      File chrome/browser/resources/webui_toolbar/app.html.ts
      Line 11, Patchset 39 (Latest): <back-forward-button id="back" direction="back"
      Qingxin Wu . unresolved

      In my CL, I was dynamically calculating the webview's size based on how many webui buttons are enabled. If we always have the buttons (same to the existing reload button as well) in the html, then if this feature flag is disabled and reload button is enabled, this back-forward button will take the one-button sized webview, and there'll be no place for reload button.

      File chrome/browser/resources/webui_toolbar/back_forward_button.ts
      Line 121, Patchset 39 (Latest): private contextMenuPosition() {
      Qingxin Wu . unresolved

      we have this function for all buttons. I'd definitely like to create a shared function for all of them. I'll work on it.

      File chrome/browser/ui/views/toolbar/toolbar_view.cc
      Line 341, Patchset 39 (Latest): if (use_webui_back_forward || use_webui_reload) {
      Paul Jensen . unresolved

      I think this should get cleaned up if you fix the merge conflicts

      Qingxin Wu

      features::IsWebUIToolbarEnabled(), see https://crsrc.org/c/chrome/browser/ui/views/toolbar/toolbar_view.cc;drc=96dad451ae9bfef46c85c0b5a0cd4025e13af109;l=318.
      And update IsWebUIToolbarEnabled to check your feature flag as well, like https://chromium-review.googlesource.com/c/chromium/src/+/7523686 as I suggested in another comment.

      Line 347, Patchset 39 (Latest): back_ = toolbar_webview_->GetBackControl();
      Qingxin Wu . unresolved

      why do we want to set back_ when we use webui back button?

      File chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
      Line 200, Patchset 39 (Latest): if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
      return;
      Qingxin Wu . unresolved

      I think it's due to you set back_ to the webui back button in toolbar_view.cc. If we don't set it there, then we should be fine.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Youseff Bourouphel
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
      Gerrit-Change-Number: 7466673
      Gerrit-PatchSet: 39
      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
      Gerrit-CC: Qingxin Wu <qing...@google.com>
      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-Comment-Date: Wed, 28 Jan 2026 16:36:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Paul Jensen (Gerrit)

      unread,
      Jan 28, 2026, 12:12:26 PMJan 28
      to Youseff Bourouphel, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
      Attention needed from Qingxin Wu and Youseff Bourouphel

      Paul Jensen added 1 comment

      File chrome/browser/ui/views/toolbar/toolbar_view.cc
      Line 347, Patchset 39 (Latest): back_ = toolbar_webview_->GetBackControl();
      Qingxin Wu . resolved

      why do we want to set back_ when we use webui back button?

      Paul Jensen

      in `toolbar_view.h` this CL changes the type of `back_` to be a parent class that both the WebUI and Views code implement. This allows existing code dereferencing `back_` to continue working (assuming the new parent class implements the desired API being used).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Qingxin Wu
      • Youseff Bourouphel
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
      Gerrit-Change-Number: 7466673
      Gerrit-PatchSet: 39
      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
      Gerrit-CC: Qingxin Wu <qing...@google.com>
      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
      Gerrit-Attention: Qingxin Wu <qing...@google.com>
      Gerrit-Comment-Date: Wed, 28 Jan 2026 17:12:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qingxin Wu (Gerrit)

      unread,
      Jan 28, 2026, 1:34:24 PMJan 28
      to Youseff Bourouphel, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
      Attention needed from Qingxin Wu and Youseff Bourouphel

      Qingxin Wu added 1 comment

      File chrome/browser/resources/webui_toolbar/back_forward_button.ts
      Line 121, Patchset 39 (Latest): private contextMenuPosition() {
      Qingxin Wu . unresolved

      we have this function for all buttons. I'd definitely like to create a shared function for all of them. I'll work on it.

      Qingxin Wu

      https://crrev.com/c/7528033. It only moved this function since my typescript also uses this function, and you can move other functions to that file as well if you need.

      Gerrit-Comment-Date: Wed, 28 Jan 2026 18:34:19 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Youseff Bourouphel (Gerrit)

      unread,
      Jan 29, 2026, 11:38:16 AMJan 29
      to Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
      Attention needed from Paul Jensen and Qingxin Wu

      Youseff Bourouphel added 18 comments

      File chrome/browser/resources/webui_toolbar/app.css
      Line 11, Patchset 39: display: flex;
      Paul Jensen . resolved

      what's the goal of this change?

      Youseff Bourouphel

      This change is necessary because the toolbar-app component now contains multiple child elements: the back button, the forward button, and the reload button

      File chrome/browser/resources/webui_toolbar/app.html.ts
      Line 11, Patchset 39: <back-forward-button id="back" direction="back"
      Qingxin Wu . resolved

      In my CL, I was dynamically calculating the webview's size based on how many webui buttons are enabled. If we always have the buttons (same to the existing reload button as well) in the html, then if this feature flag is disabled and reload button is enabled, this back-forward button will take the one-button sized webview, and there'll be no place for reload button.

      Youseff Bourouphel

      good call! Done.

      File chrome/browser/resources/webui_toolbar/app.ts
      Line 41, Patchset 39: protected accessor backVisible_: boolean = true;
      Paul Jensen . resolved

      do we need this one?

      Youseff Bourouphel

      Yes. Done

      File chrome/browser/resources/webui_toolbar/back_forward_button.ts
      Line 47, Patchset 39: private getFlags_(e: MouseEvent): ClickDispositionFlag[] {
      Paul Jensen . resolved

      can we share this method with the ReloadButton's generateFlags() maybe in a `toolbar_button.ts`?

      Youseff Bourouphel

      Done. Moved to `chrome/browser/resources/webui_toolbar/toolbar_button.ts`.

      Line 121, Patchset 39: private contextMenuPosition() {
      Qingxin Wu . resolved

      we have this function for all buttons. I'd definitely like to create a shared function for all of them. I'll work on it.

      Qingxin Wu

      https://crrev.com/c/7528033. It only moved this function since my typescript also uses this function, and you can move other functions to that file as well if you need.

      Youseff Bourouphel

      SGTM. I will build on top of that.

      File chrome/browser/resources/webui_toolbar/webui_toolbar.html
      Line 11, Patchset 39:</html>
      Qingxin Wu . resolved

      add back new line at end of file.

      Youseff Bourouphel

      Done

      File chrome/browser/ui/ui_features.h
      Line 383, Patchset 39:bool IsWebUIBackForwardButtonEnabled();
      Qingxin Wu . resolved

      probably a good idea to just pull all the feature flag changes to a separate CL, like https://crrev.com/c/7523686

      Youseff Bourouphel

      Acknowledged

      File chrome/browser/ui/views/toolbar/back_forward_control.h
      Line 1, Patchset 39:// Copyright 2026 The Chromium Authors
      Paul Jensen . resolved

      perhaps make this the second CL

      Youseff Bourouphel

      Acknowledged

      File chrome/browser/ui/views/toolbar/toolbar_view.cc
      Line 192, Patchset 39: back->AsView() ? back->AsView()->GetID() : VIEW_ID_BACK_BUTTON;
      Paul Jensen . resolved

      Can we add a BackForwardControl::GetID() method and change this whole method to be a for-loop that does the same thing for both buttons? If it's small, then we could remove this method and put the new for-loop right before the existing for-loop.

      Youseff Bourouphel

      Done

      Line 341, Patchset 39: if (use_webui_back_forward || use_webui_reload) {
      Paul Jensen . resolved

      I think this should get cleaned up if you fix the merge conflicts

      Qingxin Wu

      features::IsWebUIToolbarEnabled(), see https://crsrc.org/c/chrome/browser/ui/views/toolbar/toolbar_view.cc;drc=96dad451ae9bfef46c85c0b5a0cd4025e13af109;l=318.
      And update IsWebUIToolbarEnabled to check your feature flag as well, like https://chromium-review.googlesource.com/c/chromium/src/+/7523686 as I suggested in another comment.

      Youseff Bourouphel

      Done

      Line 692, Patchset 39:void ToolbarView::EnabledStateChangedForCommand(int id, bool enabled) {
      Qingxin Wu . resolved

      I submitted a CL that fixed a bug in this function. After rebasing, I think you don't need any change to this function.

      Youseff Bourouphel

      The issue is that `back_` and `forward_` are now typed as `BackForwardControl*` to support both the native and WebUI implementations, whereas `reload_`, `home_`, and `avatar_` are still `views::Button*`.


      Since BackForwardControl is an interface that does not inherit from views::Button, I cannot put them all into a single `std::array<views::Button*>` anymore. I have to handle the BackForwardControls and the standard views::Buttons separately.

      File chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
      Line 200, Patchset 39: if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
      return;
      Qingxin Wu . resolved

      I think it's due to you set back_ to the webui back button in toolbar_view.cc. If we don't set it there, then we should be fine.

      Youseff Bourouphel

      resolving as I think this was answered in Paul's response to another comment.

      File chrome/browser/ui/views/toolbar/webui_back_forward_control.h
      Line 1, Patchset 39:// Copyright 2026 The Chromium Authors
      Paul Jensen . resolved

      this could be third CL

      Youseff Bourouphel

      Acknowledged

      File chrome/common/chrome_features.h
      Line 1364, Patchset 39:COMPONENT_EXPORT(CHROME_FEATURES)
      Paul Jensen . resolved

      this would be first CL

      Youseff Bourouphel

      Acknowledged

      File chrome/common/chrome_features.cc
      Line 1840, Patchset 39:BASE_FEATURE(kWebUIBackForwardButton, base::FEATURE_DISABLED_BY_DEFAULT);
      Qingxin Wu . resolved

      add a comment for it

      Youseff Bourouphel

      Done

      File components/browser_apis/browser_controls/browser_controls_api.mojom
      Line 34, Patchset 39: OnBackForwardStatusChanged(BackForwardState state);
      Paul Jensen . resolved
      ```suggestion
      OnBackForwardStatusChanged(ButtonState back_state, ButtonState forward_state);
      ```
      Youseff Bourouphel

      Done

      File components/browser_apis/browser_controls/browser_controls_api_data_model.mojom
      Line 27, Patchset 39:struct BackForwardState {
      Paul Jensen . resolved

      maybe change this to just ButtonState, also see what Qingxin's CL uses, maybe combine with that

      Youseff Bourouphel

      Done

      File ui/webui/resources/cr_elements/cr_icons_lit.css
      Line 14, Patchset 39:.icon-arrow-forward {
      Paul Jensen . resolved

      could we use the back icon flipped?

      Youseff Bourouphel

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Paul Jensen
      • Qingxin Wu
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
        Gerrit-Change-Number: 7466673
        Gerrit-PatchSet: 47
        Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
        Gerrit-CC: Paul Jensen <paulj...@chromium.org>
        Gerrit-CC: Qingxin Wu <qing...@google.com>
        Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
        Gerrit-Attention: Qingxin Wu <qing...@google.com>
        Gerrit-Comment-Date: Thu, 29 Jan 2026 16:38:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
        Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Qingxin Wu (Gerrit)

        unread,
        Jan 30, 2026, 11:51:28 AMJan 30
        to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
        Attention needed from Youseff Bourouphel

        Qingxin Wu added 1 comment

        File chrome/browser/resources/webui_toolbar/back_forward_button.html.ts
        Line 12, Patchset 46: class="${
        Qingxin Wu . unresolved

        This button also has accessibility fields like aria-label and aria-haspopup?
        https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.cc;drc=57b039617d6f75845e77204b61838efd868be036;l=45
        We'll define them in the typescript side for webui toobars, e.g.,:
        https://crsrc.org/c/chrome/browser/resources/webui_toolbar/reload_button.html.ts;drc=c24c50287e9d03c5b6e9abc1c9a7ba0183c60bf4;l=13
        (just noticed I forgot to send this comment out..will take another look today. Got a ton of comments in my CL as well)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Youseff Bourouphel
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
          Gerrit-Change-Number: 7466673
          Gerrit-PatchSet: 50
          Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
          Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
          Gerrit-CC: Paul Jensen <paulj...@chromium.org>
          Gerrit-CC: Qingxin Wu <qing...@google.com>
          Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
          Gerrit-Comment-Date: Fri, 30 Jan 2026 16:51:22 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Youseff Bourouphel (Gerrit)

          unread,
          Jan 30, 2026, 1:19:20 PMJan 30
          to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
          Attention needed from Qingxin Wu

          Youseff Bourouphel added 1 comment

          File chrome/browser/resources/webui_toolbar/back_forward_button.html.ts
          Qingxin Wu . resolved

          This button also has accessibility fields like aria-label and aria-haspopup?
          https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.cc;drc=57b039617d6f75845e77204b61838efd868be036;l=45
          We'll define them in the typescript side for webui toobars, e.g.,:
          https://crsrc.org/c/chrome/browser/resources/webui_toolbar/reload_button.html.ts;drc=c24c50287e9d03c5b6e9abc1c9a7ba0183c60bf4;l=13
          (just noticed I forgot to send this comment out..will take another look today. Got a ton of comments in my CL as well)

          Youseff Bourouphel

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Qingxin Wu
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
            Gerrit-Change-Number: 7466673
            Gerrit-PatchSet: 57
            Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
            Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
            Gerrit-CC: Paul Jensen <paulj...@chromium.org>
            Gerrit-CC: Qingxin Wu <qing...@google.com>
            Gerrit-Attention: Qingxin Wu <qing...@google.com>
            Gerrit-Comment-Date: Fri, 30 Jan 2026 18:19:12 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Paul Jensen (Gerrit)

            unread,
            Jan 30, 2026, 3:34:12 PMJan 30
            to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
            Attention needed from Qingxin Wu and Youseff Bourouphel

            Paul Jensen added 5 comments

            File chrome/browser/resources/webui_toolbar/app.css
            Line 11, Patchset 39: display: flex;
            Paul Jensen . unresolved

            what's the goal of this change?

            Youseff Bourouphel

            This change is necessary because the toolbar-app component now contains multiple child elements: the back button, the forward button, and the reload button

            Paul Jensen

            Why does it need to flex? and why do we need to align in the center?

            File chrome/browser/ui/views/toolbar/toolbar_view.cc
            Line 309, Patchset 57 (Latest): auto back = std::make_unique<BackForwardButton>(
            BackForwardButton::Direction::kBack,
            base::BindRepeating(callback, browser_, IDC_BACK), browser_);
            auto forward = std::make_unique<BackForwardButton>(
            BackForwardButton::Direction::kForward,
            base::BindRepeating(callback, browser_, IDC_FORWARD), browser_);

            back_ = AddChildView(std::move(back));
            forward_ = AddChildView(std::move(forward));

            if (features::IsWebUIReloadButtonEnabled() ||
            base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
            auto toolbar_webview = std::make_unique<WebUIToolbarWebView>(
            browser_, browser_->command_controller());
            toolbar_webview_ = AddChildView(std::move(toolbar_webview));
            Paul Jensen . unresolved

            can we undo changes to these lines? they look non-functional

            Line 326, Patchset 57 (Latest): back_->SetVisible(false);
            forward_->SetVisible(false);
            Paul Jensen . unresolved

            can we instead not create the BackForwardButton's rather than create them and hide them?

            File chrome/browser/ui/views/toolbar/toolbar_view_browsertest.cc
            Line 8, Patchset 57 (Latest):#include "chrome/browser/ui/views/toolbar/back_forward_control.h"
            Paul Jensen . unresolved

            can we replace this with "class BackForwardControl;"?

            File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
            Line 171, Patchset 57 (Latest): if (features::IsWebUIReloadButtonEnabled()) {
            Paul Jensen . unresolved

            can we revert this back to the previous code?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Qingxin Wu
            • Youseff Bourouphel
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
              Gerrit-Change-Number: 7466673
              Gerrit-PatchSet: 57
              Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-CC: Paul Jensen <paulj...@chromium.org>
              Gerrit-CC: Qingxin Wu <qing...@google.com>
              Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Attention: Qingxin Wu <qing...@google.com>
              Gerrit-Comment-Date: Fri, 30 Jan 2026 20:34:00 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
              Comment-In-Reply-To: Youseff Bourouphel <ybouro...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 2, 2026, 11:15:35 AMFeb 2
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Message from Qingxin Wu

              Overall, this CL looks good and follows the patterns we established for the Split Tabs button. However, there are a few important details to address, particularly around initial state population (to avoid flicker) and accessibility.

              Similar to our work on Split Tabs (@7458181), please consider the following:

              • *1. Initial State Population (Flicker Prevention):**
              • In `webui_toolbar_ui.cc`, you are only adding the feature flag `backForwardButtonEnabled` to the data source. You are **not** adding the initial `enabled` state of the back/forward buttons.
              • In `app.ts`, `backEnabled_` and `forwardEnabled_` default to `false`.
              • This means when the toolbar loads, the buttons will be disabled until the first Mojo update arrives. Since `BrowserControlsService::OnPageInitialized` (in this CL) doesn't explicitly push the current state, the buttons might remain disabled until the user navigates or something triggers an update.
              • **Suggestion:** In `WebUIToolbarUI::WebUIToolbarUI`, populate the initial `backEnabled` and `forwardEnabled` values in the data source (using `chrome::IsCommandEnabled(browser, IDC_BACK/FORWARD)`), similar to how we populated `initialIsSplit` for Split Tabs. Alternatively, ensure `WebUIToolbarWebView::OnPageInitialized` triggers a state push.
              • *2. Accessibility Labels:**
              • In `back_forward_button.html.ts`, the `<cr-icon-button>` elements are missing accessibility labels (`aria-label` or `title`).
              • **Suggestion:** Add `title="${this.label_}"` (or similar) to the template. You can fetch the localized strings (which you correctly added to `webui_toolbar_ui.cc`) in `back_forward_button.ts` using `loadTimeData`, just like we did for Split Tabs.
              • *3. Middle Click Handling:**
              • In `back_forward_button.ts`, `onClick_` handles `e.button === 1` (middle click). However, standard `click` events usually only fire for the primary button (left click). Middle clicks often fire `auxclick`.
              • **Suggestion:** Verify if `<cr-icon-button>` fires `click` for middle clicks. If not, you may need to listen to `@auxclick` in `back_forward_button.html.ts` to support opening in a new tab via middle-click.

              **4. Integration with Split Tabs:**
              Please ensure `BrowserControlsService::OnPageInitialized` preserves the Split Tabs initialization logic (calling `IsButtonPinned` / `OnButtonPinStateChanged` and `OnTabSplitStatusChanged`) which was recently added. The diff here shows a clean `OnPageInitialized`, which might conflict with recent changes.

              **5. Testing:**
              Great job adding comprehensive tests in `WebUIToolbarWebViewBackForwardBrowserTest`. The use of Shadow DOM traversal in `EvalJs` looks correct and robust.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Youseff Bourouphel
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
              Gerrit-Change-Number: 7466673
              Gerrit-PatchSet: 57
              Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-CC: Paul Jensen <paulj...@chromium.org>
              Gerrit-CC: Qingxin Wu <qing...@google.com>
              Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Comment-Date: Mon, 02 Feb 2026 16:15:26 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 2, 2026, 11:17:32 AMFeb 2
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Qingxin Wu added 2 comments

              Patchset-level comments
              File-level comment, Patchset 57 (Latest):
              Qingxin Wu . resolved

              oh ignore my last comment which was auto posted by gemini. Sorry about that.

              File chrome/browser/resources/webui_toolbar/app.ts
              Line 31, Patchset 55: static override get properties() {
              Qingxin Wu . unresolved

              There seems to be an ordering issue in this file. Can we re-order following WebUI conventions as suggested in this comment in another CL:

              https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/b6d8c5b6_fd4fd453/

              Gerrit-Comment-Date: Mon, 02 Feb 2026 16:17:21 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 2, 2026, 11:52:06 AMFeb 2
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Qingxin Wu added 6 comments

              File chrome/browser/resources/webui_toolbar/app.html.ts
              Line 11, Patchset 57 (Latest): ${
              this.backForwardButtonEnabled_ ? html`

              <back-forward-button id="back" direction="back"
              aria-label="$i18n{backButtonAccName}"
              title="$i18n{backButtonTooltip}"
              ?disabled="${!this.backEnabled_}"
              .leadingMargin="${this.backButtonMargin_}"></back-forward-button>
              <back-forward-button id="forward" direction="forward"
              aria-label="$i18n{forwardButtonAccName}"
              title="$i18n{forwardButtonTooltip}"
              ?disabled="${!this.forwardEnabled_}"
              ?hidden="${!this.forwardVisible_}"></back-forward-button>
              ` :
              ''}
              <reload-button-app id="reload"></reload-button-app>
              Qingxin Wu . unresolved

              My CL got the same comment [0] below (you can see how I reformatted it):
              keep these on the same line. The first line of the template should also have 0 indent.

              Use // clang-format off and // clang-format on comments before and after the template string to prevent clang format from messing it up. Clang format doesn't really know how to format HTML strings in TS files.

              [0] https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/d1986a86_c0088c8f/

              File chrome/browser/resources/webui_toolbar/back_forward_button.css
              Line 19, Patchset 57 (Latest)::host([hidden]) {
              display: none;
              }
              Qingxin Wu . unresolved

              import from cr_hidden_style_lit instead?

              See split_tabs_button.css https://chromium-review.googlesource.com/c/chromium/src/+/7458181/43..44

              File chrome/browser/resources/webui_toolbar/back_forward_button.ts
              Line 45, Patchset 57 (Latest): override render() {
              return getHtml.bind(this)();
              }
              Qingxin Wu . unresolved

              move this up to the top of the file, right after get styles()

              File chrome/browser/resources/webui_toolbar/browser_proxy.ts
              Line 23, Patchset 57 (Latest): WindowOpenDisposition,
              Qingxin Wu . unresolved

              where is this used in other files? if not used, we don't need to export it?

              File chrome/browser/ui/views/toolbar/toolbar_view.cc
              Line 319, Patchset 57 (Latest): if (features::IsWebUIReloadButtonEnabled() ||
              base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
              Qingxin Wu . unresolved

              Probably a rebase mistake. Instead of this, change this back to features::IsWebUIToolbarEnabled(), but update features::IsWebUIToolbarEnabled() to consider kWebUIBackForwardButton as well.

              Line 683, Patchset 57 (Latest): // Handle back and forward buttons.
              const std::array<BackForwardControl*, 2> back_forward_controls{back_,
              forward_};
              auto bf_it = std::ranges::find_if(
              back_forward_controls,
              [id](BackForwardControl* b) { return b && b->GetTag() == id; });
              if (bf_it != back_forward_controls.end()) {
              (*bf_it)->SetEnabled(enabled);
              return;
              }
              Qingxin Wu . unresolved

              why do we need to have these two separately?

              Gerrit-Comment-Date: Mon, 02 Feb 2026 16:52:00 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 2, 2026, 12:27:29 PMFeb 2
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Qingxin Wu added 2 comments

              File chrome/browser/resources/webui_toolbar/app.ts
              Line 41, Patchset 57 (Latest): protected accessor backForwardButtonEnabled_: boolean =
              Qingxin Wu . unresolved

              I'm probably missing something here, but wondering why we needed these properties in this file, other than back_forward_button.ts.

              Line 55, Patchset 57 (Latest): this.browserProxy_.callbackRouter.onBackForwardStatusChanged.addListener(
              Qingxin Wu . unresolved

              I think we should add the listeners in connectedCallback() instead of the constructor, and remove the listeners in disconnectedCallback(), otherwise there'll be memory leaks. But let me know if I missed something here.
              See discussion in another CL's comment: https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/9a49a6c0_ea7d425f/

              Gerrit-Comment-Date: Mon, 02 Feb 2026 17:27:22 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 2, 2026, 12:36:24 PMFeb 2
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Qingxin Wu added 1 comment

              File chrome/browser/resources/webui_toolbar/app.ts
              Line 61, Patchset 57 (Latest): this.browserProxy_.callbackRouter.onBackButtonLeadingMarginChanged
              Qingxin Wu . unresolved

              do we need separate mojo functions to get the initial state of the back forward buttons? See https://crrev.com/c/7535796 and https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/ for the conversation on my CL for more context.

              Gerrit-Comment-Date: Mon, 02 Feb 2026 17:36:19 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qingxin Wu (Gerrit)

              unread,
              Feb 3, 2026, 3:53:25 PMFeb 3
              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Youseff Bourouphel

              Qingxin Wu added 2 comments

              File chrome/browser/resources/webui_toolbar/app.css
              Line 11, Patchset 39: display: flex;
              Paul Jensen . unresolved

              what's the goal of this change?

              Youseff Bourouphel

              This change is necessary because the toolbar-app component now contains multiple child elements: the back button, the forward button, and the reload button

              Paul Jensen

              Why does it need to flex? and why do we need to align in the center?

              Qingxin Wu

              the host element is a custom element (which defaults to display: inline), we set `display: flex` to enforce a block-level flex container. This ensures the child buttons render in a row natually and allows us to use gap for precise spacing between elements inside. It's annoying to manage the elements inside and handle the gap (probably through margin) if it was inline. I also saw the button rendered misaligned when I was not using flex.

              File components/browser_apis/browser_controls/browser_controls_api.mojom
              Line 69, Patchset 58: // Notifies that the back button was hovered.
              Qingxin Wu . unresolved

              nit: back or forward?

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Youseff Bourouphel
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
              Gerrit-Change-Number: 7466673
              Gerrit-PatchSet: 58
              Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-CC: Paul Jensen <paulj...@chromium.org>
              Gerrit-CC: Qingxin Wu <qing...@google.com>
              Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
              Gerrit-Comment-Date: Tue, 03 Feb 2026 20:53:19 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Youseff Bourouphel (Gerrit)

              unread,
              Feb 3, 2026, 4:55:08 PMFeb 3
              to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
              Attention needed from Paul Jensen and Qingxin Wu

              Youseff Bourouphel added 16 comments

              File chrome/browser/resources/webui_toolbar/app.css
              Line 11, Patchset 39: display: flex;
              Paul Jensen . resolved

              what's the goal of this change?

              Youseff Bourouphel

              This change is necessary because the toolbar-app component now contains multiple child elements: the back button, the forward button, and the reload button

              Paul Jensen

              Why does it need to flex? and why do we need to align in the center?

              Youseff Bourouphel

              The flex is important to ensure it being a row of items. I figured we would want it centered in the box but after testing i see it makes no difference. I removed that.

              File chrome/browser/resources/webui_toolbar/app.html.ts

              this.backForwardButtonEnabled_ ? html`
              <back-forward-button id="back" direction="back"
              aria-label="$i18n{backButtonAccName}"
              title="$i18n{backButtonTooltip}"
              ?disabled="${!this.backEnabled_}"
              .leadingMargin="${this.backButtonMargin_}"></back-forward-button>
              <back-forward-button id="forward" direction="forward"
              aria-label="$i18n{forwardButtonAccName}"
              title="$i18n{forwardButtonTooltip}"
              ?disabled="${!this.forwardEnabled_}"
              ?hidden="${!this.forwardVisible_}"></back-forward-button>
              ` :
              ''}
              <reload-button-app id="reload"></reload-button-app>
              Qingxin Wu . resolved

              My CL got the same comment [0] below (you can see how I reformatted it):
              keep these on the same line. The first line of the template should also have 0 indent.

              Use // clang-format off and // clang-format on comments before and after the template string to prevent clang format from messing it up. Clang format doesn't really know how to format HTML strings in TS files.

              [0] https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/d1986a86_c0088c8f/

              Youseff Bourouphel

              Done

              File chrome/browser/resources/webui_toolbar/app.ts
              Line 31, Patchset 55: static override get properties() {
              Qingxin Wu . resolved

              There seems to be an ordering issue in this file. Can we re-order following WebUI conventions as suggested in this comment in another CL:

              https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/b6d8c5b6_fd4fd453/

              Youseff Bourouphel

              Acknowledged

              Line 41, Patchset 57: protected accessor backForwardButtonEnabled_: boolean =
              Qingxin Wu . resolved

              I'm probably missing something here, but wondering why we needed these properties in this file, other than back_forward_button.ts.

              Youseff Bourouphel

              Yeah, in an effort to seperate out all of the back/forward button logic, I made `back_forward_section` which will hold the two buttons and manage the logic that controls them.

              This should improve separation of concerns and keeps the codebase cleaner by decoupling that logic from the main view.

              Line 55, Patchset 57: this.browserProxy_.callbackRouter.onBackForwardStatusChanged.addListener(
              Qingxin Wu . resolved

              I think we should add the listeners in connectedCallback() instead of the constructor, and remove the listeners in disconnectedCallback(), otherwise there'll be memory leaks. But let me know if I missed something here.
              See discussion in another CL's comment: https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/9a49a6c0_ea7d425f/

              Youseff Bourouphel

              Acknowledged

              Line 61, Patchset 57: this.browserProxy_.callbackRouter.onBackButtonLeadingMarginChanged
              Qingxin Wu . resolved

              do we need separate mojo functions to get the initial state of the back forward buttons? See https://crrev.com/c/7535796 and https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/ for the conversation on my CL for more context.

              Youseff Bourouphel

              I've updated the implementation to follow the 'Push on Subscribe' pattern recommended in that conversation.

              Instead of adding separate Get Mojo functions for the initial state, I modified BrowserControlsService::AddObserver to immediately query the delegate and push the current button state and margin to the observer. This ensures the WebUI receives the correct initial state as soon as it subscribes, reusing the existing OnBackForwardStatusChanged and OnBackButtonLeadingMarginChanged listeners.

              Let me know if I should be doing it differently!

              File chrome/browser/resources/webui_toolbar/back_forward_button.css
              Line 19, Patchset 57::host([hidden]) {
              display: none;
              }
              Qingxin Wu . resolved

              import from cr_hidden_style_lit instead?

              See split_tabs_button.css https://chromium-review.googlesource.com/c/chromium/src/+/7458181/43..44

              Youseff Bourouphel

              Done

              File chrome/browser/resources/webui_toolbar/back_forward_button.ts
              Line 45, Patchset 57: override render() {
              return getHtml.bind(this)();
              }
              Qingxin Wu . resolved

              move this up to the top of the file, right after get styles()

              Youseff Bourouphel

              Done

              File chrome/browser/resources/webui_toolbar/browser_proxy.ts
              Line 23, Patchset 57: WindowOpenDisposition,
              Qingxin Wu . resolved

              where is this used in other files? if not used, we don't need to export it?

              Youseff Bourouphel

              Acknowledged

              File chrome/browser/ui/views/toolbar/toolbar_view.cc
              Line 319, Patchset 57: if (features::IsWebUIReloadButtonEnabled() ||
              base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
              Qingxin Wu . resolved

              Probably a rebase mistake. Instead of this, change this back to features::IsWebUIToolbarEnabled(), but update features::IsWebUIToolbarEnabled() to consider kWebUIBackForwardButton as well.

              Youseff Bourouphel

              Acknowledged

              Line 309, Patchset 57: auto back = std::make_unique<BackForwardButton>(

              BackForwardButton::Direction::kBack,
              base::BindRepeating(callback, browser_, IDC_BACK), browser_);
              auto forward = std::make_unique<BackForwardButton>(
              BackForwardButton::Direction::kForward,
              base::BindRepeating(callback, browser_, IDC_FORWARD), browser_);

              back_ = AddChildView(std::move(back));
              forward_ = AddChildView(std::move(forward));

              if (features::IsWebUIReloadButtonEnabled() ||
              base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
              auto toolbar_webview = std::make_unique<WebUIToolbarWebView>(
              browser_, browser_->command_controller());
              toolbar_webview_ = AddChildView(std::move(toolbar_webview));
              Paul Jensen . resolved

              can we undo changes to these lines? they look non-functional

              Youseff Bourouphel

              Acknowledged

              Line 326, Patchset 57: back_->SetVisible(false);
              forward_->SetVisible(false);
              Paul Jensen . resolved

              can we instead not create the BackForwardButton's rather than create them and hide them?

              Youseff Bourouphel

              Done

              Line 683, Patchset 57: // Handle back and forward buttons.

              const std::array<BackForwardControl*, 2> back_forward_controls{back_,
              forward_};
              auto bf_it = std::ranges::find_if(
              back_forward_controls,
              [id](BackForwardControl* b) { return b && b->GetTag() == id; });
              if (bf_it != back_forward_controls.end()) {
              (*bf_it)->SetEnabled(enabled);
              return;
              }
              Qingxin Wu . resolved

              why do we need to have these two separately?

              Youseff Bourouphel

              BackForwardControl is an abstract interface and not a views::View, which allows back_/forward_ to point to either native or WebUI implementations. Because of this type difference, they cannot be added to the std::array<views::Button*> used for the other buttons (like reload_, which is typed concretely as a ReloadButton view).

              File chrome/browser/ui/views/toolbar/toolbar_view_browsertest.cc
              Line 8, Patchset 57:#include "chrome/browser/ui/views/toolbar/back_forward_control.h"
              Paul Jensen . resolved

              can we replace this with "class BackForwardControl;"?

              Youseff Bourouphel

              I don't think we can replace it. The test calls `GetVisible()` on the `BackForwardControl*` returned by `GetForwardButton()`. Since we are accessing a member function, the compiler needs the full class definition from the header file.

              File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
              Line 171, Patchset 57: if (features::IsWebUIReloadButtonEnabled()) {
              Paul Jensen . resolved

              can we revert this back to the previous code?

              Youseff Bourouphel

              Done

              File components/browser_apis/browser_controls/browser_controls_api.mojom
              Line 69, Patchset 58: // Notifies that the back button was hovered.
              Qingxin Wu . resolved

              nit: back or forward?

              Youseff Bourouphel

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Paul Jensen
              • Qingxin Wu
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                Gerrit-Change-Number: 7466673
                Gerrit-PatchSet: 62
                Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                Gerrit-CC: Qingxin Wu <qing...@google.com>
                Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                Gerrit-Attention: Qingxin Wu <qing...@google.com>
                Gerrit-Comment-Date: Tue, 03 Feb 2026 21:55:04 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
                Comment-In-Reply-To: Youseff Bourouphel <ybouro...@google.com>
                Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Paul Jensen (Gerrit)

                unread,
                Feb 4, 2026, 9:12:14 AMFeb 4
                to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                Attention needed from Qingxin Wu and Youseff Bourouphel

                Paul Jensen added 1 comment

                Patchset-level comments
                File-level comment, Patchset 62 (Latest):
                Paul Jensen . unresolved

                It looks like https://chromium-review.googlesource.com/c/chromium/src/+/7458181 is going to land shortly, can we rebase this CL on top of that CL? I think it will make it easier to review by having the new code along side the split tabs button changes, and it will remove some of the duplicated changes.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Qingxin Wu
                • Youseff Bourouphel
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                  Gerrit-Change-Number: 7466673
                  Gerrit-PatchSet: 62
                  Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                  Gerrit-CC: Qingxin Wu <qing...@google.com>
                  Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-Attention: Qingxin Wu <qing...@google.com>
                  Gerrit-Comment-Date: Wed, 04 Feb 2026 14:12:09 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Paul Jensen (Gerrit)

                  unread,
                  Feb 4, 2026, 11:01:11 AMFeb 4
                  to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                  Attention needed from Qingxin Wu and Youseff Bourouphel

                  Paul Jensen added 1 comment

                  File chrome/browser/resources/webui_toolbar/back_forward_section.ts
                  Line 51, Patchset 62 (Latest): this.backForwardStatusChangedListenerId_ =
                  Paul Jensen . unresolved

                  rather than move this into BackForwardSectionElement, can we instead move it into back_forward_button.ts (and eventually it will move into toolbar_button.ts)? basically each button can listen for changes to it's button type.

                  Gerrit-Comment-Date: Wed, 04 Feb 2026 16:01:03 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Qingxin Wu (Gerrit)

                  unread,
                  Feb 5, 2026, 10:49:09 AMFeb 5
                  to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                  Attention needed from Youseff Bourouphel

                  Qingxin Wu added 1 comment

                  File chrome/browser/resources/webui_toolbar/app.ts
                  Line 61, Patchset 57: this.browserProxy_.callbackRouter.onBackButtonLeadingMarginChanged
                  Qingxin Wu . unresolved

                  do we need separate mojo functions to get the initial state of the back forward buttons? See https://crrev.com/c/7535796 and https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/ for the conversation on my CL for more context.

                  Youseff Bourouphel

                  I've updated the implementation to follow the 'Push on Subscribe' pattern recommended in that conversation.

                  Instead of adding separate Get Mojo functions for the initial state, I modified BrowserControlsService::AddObserver to immediately query the delegate and push the current button state and margin to the observer. This ensures the WebUI receives the correct initial state as soon as it subscribes, reusing the existing OnBackForwardStatusChanged and OnBackButtonLeadingMarginChanged listeners.

                  Let me know if I should be doing it differently!

                  Qingxin Wu

                  no, we were suggested to: In connectedCallback

                  • Get initial state
                  • Add listener to receive future updates.

                  sending a magical initial event the first time a listener is added is an anti-pattern for the rest of WebUI code. Instead explicit query and observe APIs are preferred. If you look at the most recent discussions on https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/, you'll see that we changed to use the pull model.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Youseff Bourouphel
                  Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                  Gerrit-Change-Number: 7466673
                  Gerrit-PatchSet: 62
                  Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                  Gerrit-CC: Qingxin Wu <qing...@google.com>
                  Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                  Gerrit-Comment-Date: Thu, 05 Feb 2026 15:49:05 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Youseff Bourouphel (Gerrit)

                  unread,
                  Feb 6, 2026, 1:50:33 PMFeb 6
                  to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                  Attention needed from Paul Jensen and Qingxin Wu

                  Youseff Bourouphel added 3 comments

                  Patchset-level comments
                  File-level comment, Patchset 62:
                  Paul Jensen . resolved

                  It looks like https://chromium-review.googlesource.com/c/chromium/src/+/7458181 is going to land shortly, can we rebase this CL on top of that CL? I think it will make it easier to review by having the new code along side the split tabs button changes, and it will remove some of the duplicated changes.

                  Youseff Bourouphel

                  Done

                  File chrome/browser/resources/webui_toolbar/app.ts
                  Line 61, Patchset 57: this.browserProxy_.callbackRouter.onBackButtonLeadingMarginChanged
                  Qingxin Wu . resolved

                  do we need separate mojo functions to get the initial state of the back forward buttons? See https://crrev.com/c/7535796 and https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/ for the conversation on my CL for more context.

                  Youseff Bourouphel

                  I've updated the implementation to follow the 'Push on Subscribe' pattern recommended in that conversation.

                  Instead of adding separate Get Mojo functions for the initial state, I modified BrowserControlsService::AddObserver to immediately query the delegate and push the current button state and margin to the observer. This ensures the WebUI receives the correct initial state as soon as it subscribes, reusing the existing OnBackForwardStatusChanged and OnBackButtonLeadingMarginChanged listeners.

                  Let me know if I should be doing it differently!

                  Qingxin Wu

                  no, we were suggested to: In connectedCallback

                  • Get initial state
                  • Add listener to receive future updates.

                  sending a magical initial event the first time a listener is added is an anti-pattern for the rest of WebUI code. Instead explicit query and observe APIs are preferred. If you look at the most recent discussions on https://chromium-review.googlesource.com/c/chromium/src/+/7458181/comment/baed1082_299042e6/, you'll see that we changed to use the pull model.

                  Youseff Bourouphel

                  Thanks for clarifying I just did that. I also moved the logic under chrome/browser/resources/webui_toolbar/back_forward_button.ts as per Paul's comment here https://chromium-review.googlesource.com/c/chromium/src/+/7466673/comment/ea7a5022_7028bad3/

                  File chrome/browser/resources/webui_toolbar/back_forward_section.ts
                  Line 51, Patchset 62: this.backForwardStatusChangedListenerId_ =
                  Paul Jensen . resolved

                  rather than move this into BackForwardSectionElement, can we instead move it into back_forward_button.ts (and eventually it will move into toolbar_button.ts)? basically each button can listen for changes to it's button type.

                  Youseff Bourouphel

                  Done

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Paul Jensen
                  • Qingxin Wu
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                    Gerrit-Change-Number: 7466673
                    Gerrit-PatchSet: 67
                    Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                    Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                    Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                    Gerrit-CC: Qingxin Wu <qing...@google.com>
                    Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                    Gerrit-Attention: Qingxin Wu <qing...@google.com>
                    Gerrit-Comment-Date: Fri, 06 Feb 2026 18:50:29 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Paul Jensen (Gerrit)

                    unread,
                    Feb 9, 2026, 9:48:09 AM (12 days ago) Feb 9
                    to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                    Attention needed from Qingxin Wu and Youseff Bourouphel

                    Paul Jensen added 18 comments

                    File chrome/browser/resources/webui_toolbar/app.html.ts
                    Line 12, Patchset 68 (Latest): ${this.backForwardButtonEnabled_ ? html`
                    Paul Jensen . unresolved

                    ditto
                    ```suggestion
                    ${this.backForwardButtonEnabled_ ? html`
                    ```

                    Line 14, Patchset 68 (Latest): aria-label="$i18n{backButtonAccName}"
                    title="$i18n{backButtonTooltip}"></back-forward-button>

                    <back-forward-button id="forward" direction="forward"
                    aria-label="$i18n{forwardButtonAccName}"
                    title="$i18n{forwardButtonTooltip}"></back-forward-button>` : ''}
                    Paul Jensen . unresolved
                    Hmm, should we move the aria-label and title pieces into the buttons themselves?  i.e. in the back_forward_button.html.ts you'd have
                    ```
                    aria-label="$i18n{this.direction === "back" ? backButonAccName : forwardButtonAccName}"
                    ```
                    File chrome/browser/resources/webui_toolbar/app.ts
                    Line 38, Patchset 68 (Latest): backForwardButtonEnabled_: {type: Boolean},
                    Paul Jensen . unresolved
                    for uniformity with above flags
                    ```suggestion
                    isBackForwardButtonEnabled_: {type: Boolean},
                    ```
                    Line 46, Patchset 68 (Latest): protected accessor backForwardButtonEnabled_: boolean =
                    Paul Jensen . unresolved
                    ditto
                    ```suggestion
                    protected accessor isBackForwardButtonEnabled_: boolean =
                    ```
                    Line 47, Patchset 68 (Latest): loadTimeData.getBoolean('backForwardButtonEnabled');
                    Paul Jensen . unresolved
                    ditto
                    ```suggestion
                    loadTimeData.getBoolean('enableBackForwardButtons');
                    ```
                    File chrome/browser/resources/webui_toolbar/back_forward_button.css
                    Line 17, Patchset 68 (Latest): height: 34px;
                    Paul Jensen . unresolved
                    more like split_tabs_button.css:
                    ```suggestion
                    --cr-icon-button-icon-size: 20px;
                    --cr-icon-button-margin-end: 0;
                    --cr-icon-button-margin-start: 0;
                    --cr-icon-button-size: 34px;
                    height: var(--cr-icon-button-size);
                    width: var(--cr-icon-button-size);
                    ```
                    Line 21, Patchset 68 (Latest): --cr-icon-button-icon-size: 20px;
                    --cr-icon-button-margin-end: 0;
                    --cr-icon-button-margin-start: 0;
                    --cr-icon-button-size: 34px;
                    Paul Jensen . unresolved

                    Then we can remove these lines
                    ```suggestion
                    ```

                    File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                    Line 188, Patchset 68 (Latest): if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
                    // Back button is always visible.
                    button_count++;
                    if (forward_control_.GetVisible()) {
                    button_count++;
                    }
                    }
                    Paul Jensen . unresolved
                    to be more like above code
                    ```suggestion
                    button_count += base::FeatureList::IsEnabled(features::kWebUIBackForwardButton);
                    button_count += base::FeatureList::IsEnabled(features::kWebUIBackForwardButton) &&
                    forward_control_.GetVisible();
                    ```
                    Line 283, Patchset 68 (Latest):WebUIBackForwardControl* WebUIToolbarWebView::GetBackControl() {
                    return &back_control_;
                    }

                    WebUIBackForwardControl* WebUIToolbarWebView::GetForwardControl() {
                    return &forward_control_;
                    }
                    Paul Jensen . unresolved

                    can we move these up so they're next to GetReloadControl()?

                    File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.h
                    Line 118, Patchset 68 (Latest): // MetricsReporterService lifetime is tied to `web_contents_` which can be
                    Paul Jensen . unresolved

                    why are we removing the comma?

                    Line 67, Patchset 68 (Latest): void SetBackForwardButtonState(bool back_enabled,
                    bool back_visible,
                    bool forward_enabled,
                    bool forward_visible);
                    Paul Jensen . unresolved
                    ```suggestion
                    void SetBackForwardButtonState(browser_controls_api::mojom::ButtonState back_state,
                    browser_controls_api::mojom::ButtonState forward_state);
                    ```
                    Line 41, Patchset 68 (Latest): virtual void GetBackForwardButtonStates(bool* back_enabled,
                    bool* back_visible,
                    bool* forward_enabled,
                    bool* forward_visible) = 0;
                    Paul Jensen . unresolved
                    ```suggestion
                    virtual void GetBackForwardButtonStates(browser_controls_api::mojom::ButtonStatePtr back_state,
                    browser_controls_api::mojom::ButtonStatePtr forward_state) = 0;
                    ```
                    File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.cc
                    Line 144, Patchset 68 (Latest): // Gets the argument time immediately after executing the command.
                    Paul Jensen . unresolved

                    why this change?

                    File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.h
                    Line 60, Patchset 68 (Latest): void SetBackForwardButtonState(bool back_enabled,
                    bool back_visible,
                    bool forward_enabled,
                    bool forward_visible);
                    Paul Jensen . unresolved
                    ```suggestion
                    void SetBackForwardButtonState(browser_controls_api::mojom::ButtonState back_state,
                    browser_controls_api::mojom::ButtonState forward_state);
                    ```
                    File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
                    Line 70, Patchset 68 (Latest): source->AddBoolean(
                    "backForwardButtonEnabled",
                    base::FeatureList::IsEnabled(features::kWebUIBackForwardButton));
                    Paul Jensen . unresolved

                    can we move this down beside the enableReloadButton code below?

                    Line 79, Patchset 68 (Latest): source->AddBoolean("backEnabled",
                    chrome::IsCommandEnabled(browser, IDC_BACK));
                    source->AddBoolean("forwardEnabled",
                    chrome::IsCommandEnabled(browser, IDC_FORWARD));
                    Paul Jensen . unresolved

                    I'm told LoadTimeData should not be used for things that are not constant across a browser session (i.e. basically should only be used for feature flags and localized strings). Can we get rid of this code and rely on the getBackForwardState() call in the back_forward_button.ts constructor?

                    File components/browser_apis/browser_controls/browser_controls_api.mojom
                    Line 87, Patchset 68 (Latest): // Notifies that the back button was hovered.
                    Paul Jensen . unresolved

                    This comment says back button only, but the API takes a control type. Perhaps we should change the API to just be `BackButtonHovered()`?

                    File ui/webui/resources/cr_elements/cr_icons_lit.css
                    Line 16, Patchset 68 (Latest): transform: scaleX(-1);
                    Paul Jensen . unresolved
                    Can we move this into back_forward_button.css?  e.g. hardcode the icon as the forward one but then add some conditional CSS like:
                    ```
                    blah[direction=back] {
                    transform: scaleX(-1);
                    }
                    ```
                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Qingxin Wu
                    • Youseff Bourouphel
                    Submit Requirements:
                      • requirement satisfiedCode-Coverage
                      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                      Gerrit-Change-Number: 7466673
                      Gerrit-PatchSet: 68
                      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                      Gerrit-CC: Qingxin Wu <qing...@google.com>
                      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-Attention: Qingxin Wu <qing...@google.com>
                      Gerrit-Comment-Date: Mon, 09 Feb 2026 14:48:03 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Qingxin Wu (Gerrit)

                      unread,
                      Feb 9, 2026, 12:22:09 PM (12 days ago) Feb 9
                      to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                      Attention needed from Youseff Bourouphel

                      Qingxin Wu added 6 comments

                      File chrome/browser/resources/webui_toolbar/back_forward_button.css
                      Line 24, Patchset 68 (Latest): --cr-icon-button-size: 34px;
                      Qingxin Wu . unresolved

                      I guess your buttons would have the same touch mode issue, where the icon would be larger in touch mode. I'm trying to fix it for split tabs button. You can probably fix it after my WIP CL (https://crrev.com/c/7533005) is proved working. Just a heads up.

                      File chrome/browser/ui/views/toolbar/webui_back_forward_control.cc
                      Line 41, Patchset 68 (Latest): menu_model_.get(), views::MenuRunner::CONTEXT_MENU);
                      Qingxin Wu . unresolved

                      should this be `views::MenuRunner::HAS_MNEMONICS`?

                      From my understanding, BackForwardButton relies on ToolbarButton::ShowContextMenuForViewImpl (for right-click) or ToolbarButton::OnMousePressed (for long-press), which both call ShowDropDownMenu. ShowDropDownMenu calls `ShowMenuForModel` [0], which creates its MenuRunner with HAS_MNEMONICS. I was fixing the context menu for split tabs button's right click as well, but let me know if I missunderstood how the Views buttons work.


                      [0] https://crsrc.org/c/chrome/browser/ui/views/toolbar/toolbar_button.cc;drc=2b771af51257844d0ff230fd7b5f49815226ea7c;l=602

                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.h
                      Line 103, Patchset 68 (Latest): bool did_recover_from_previous_termination_ = false;
                      Qingxin Wu . unresolved

                      seems to be refactor issue. This has been removed in https://chromium-review.googlesource.com/c/chromium/src/+/7541177

                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                      Line 188, Patchset 68 (Latest): if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
                      Qingxin Wu . unresolved

                      we should use features::IsWebUIBackForwardButtonEnabled? same below

                      Line 191, Patchset 68 (Latest): if (forward_control_.GetVisible()) {
                      button_count++;
                      }
                      Qingxin Wu . unresolved

                      nit: `button_count += forward_control_.GetVisible();`

                      File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.cc
                      Line 144, Patchset 68 (Latest): // Gets the argument time immediately after executing the command.
                      Qingxin Wu . unresolved

                      what does this "argument time" mean

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Youseff Bourouphel
                      Submit Requirements:
                      • requirement satisfiedCode-Coverage
                      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                      Gerrit-Change-Number: 7466673
                      Gerrit-PatchSet: 68
                      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                      Gerrit-CC: Qingxin Wu <qing...@google.com>
                      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                      Gerrit-Comment-Date: Mon, 09 Feb 2026 17:22:02 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Youseff Bourouphel (Gerrit)

                      unread,
                      Feb 9, 2026, 2:48:20 PM (12 days ago) Feb 9
                      to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                      Attention needed from Paul Jensen and Qingxin Wu

                      Youseff Bourouphel added 28 comments

                      File chrome/browser/resources/webui_toolbar/app.html.ts
                      Line 12, Patchset 68: ${this.backForwardButtonEnabled_ ? html`
                      Paul Jensen . resolved

                      ditto
                      ```suggestion
                      ${this.backForwardButtonEnabled_ ? html`
                      ```

                      Youseff Bourouphel

                      Done

                      Line 12, Patchset 68: ${this.backForwardButtonEnabled_ ? html`
                      Paul Jensen . resolved

                      ditto
                      ```suggestion
                      ${this.backForwardButtonEnabled_ ? html`
                      ```

                      Youseff Bourouphel

                      Done

                      Line 14, Patchset 68: aria-label="$i18n{backButtonAccName}"

                      title="$i18n{backButtonTooltip}"></back-forward-button>
                      <back-forward-button id="forward" direction="forward"
                      aria-label="$i18n{forwardButtonAccName}"
                      title="$i18n{forwardButtonTooltip}"></back-forward-button>` : ''}
                      Paul Jensen . resolved
                      Hmm, should we move the aria-label and title pieces into the buttons themselves?  i.e. in the back_forward_button.html.ts you'd have
                      ```
                      aria-label="$i18n{this.direction === "back" ? backButonAccName : forwardButtonAccName}"
                      ```
                      Youseff Bourouphel

                      Done

                      Line 14, Patchset 68: aria-label="$i18n{backButtonAccName}"

                      title="$i18n{backButtonTooltip}"></back-forward-button>
                      <back-forward-button id="forward" direction="forward"
                      aria-label="$i18n{forwardButtonAccName}"
                      title="$i18n{forwardButtonTooltip}"></back-forward-button>` : ''}
                      Paul Jensen . resolved
                      Hmm, should we move the aria-label and title pieces into the buttons themselves?  i.e. in the back_forward_button.html.ts you'd have
                      ```
                      aria-label="$i18n{this.direction === "back" ? backButonAccName : forwardButtonAccName}"
                      ```
                      Youseff Bourouphel

                      Done

                      File chrome/browser/resources/webui_toolbar/app.ts
                      Line 38, Patchset 68: backForwardButtonEnabled_: {type: Boolean},
                      Paul Jensen . resolved
                      for uniformity with above flags
                      ```suggestion
                      isBackForwardButtonEnabled_: {type: Boolean},
                      ```
                      Youseff Bourouphel

                      Done

                      Line 46, Patchset 68: protected accessor backForwardButtonEnabled_: boolean =
                      Paul Jensen . resolved
                      ditto
                      ```suggestion
                      protected accessor isBackForwardButtonEnabled_: boolean =
                      ```
                      Youseff Bourouphel

                      Done

                      Line 47, Patchset 68: loadTimeData.getBoolean('backForwardButtonEnabled');
                      Paul Jensen . resolved
                      ditto
                      ```suggestion
                      loadTimeData.getBoolean('enableBackForwardButtons');
                      ```
                      Youseff Bourouphel

                      Done

                      File chrome/browser/resources/webui_toolbar/back_forward_button.css
                      Line 17, Patchset 68: height: 34px;
                      Paul Jensen . resolved
                      more like split_tabs_button.css:
                      ```suggestion
                      --cr-icon-button-icon-size: 20px;
                      --cr-icon-button-margin-end: 0;
                      --cr-icon-button-margin-start: 0;
                      --cr-icon-button-size: 34px;
                      height: var(--cr-icon-button-size);
                      width: var(--cr-icon-button-size);
                      ```
                      Youseff Bourouphel

                      Done

                      Line 17, Patchset 68: height: 34px;
                      Paul Jensen . resolved
                      more like split_tabs_button.css:
                      ```suggestion
                      --cr-icon-button-icon-size: 20px;
                      --cr-icon-button-margin-end: 0;
                      --cr-icon-button-margin-start: 0;
                      --cr-icon-button-size: 34px;
                      height: var(--cr-icon-button-size);
                      width: var(--cr-icon-button-size);
                      ```
                      Youseff Bourouphel

                      Done

                      Line 21, Patchset 68: --cr-icon-button-icon-size: 20px;

                      --cr-icon-button-margin-end: 0;
                      --cr-icon-button-margin-start: 0;
                      --cr-icon-button-size: 34px;
                      Paul Jensen . unresolved

                      Then we can remove these lines
                      ```suggestion
                      ```

                      Youseff Bourouphel

                      moved up into :host just like split tabs

                      Line 24, Patchset 68: --cr-icon-button-size: 34px;
                      Qingxin Wu . resolved

                      I guess your buttons would have the same touch mode issue, where the icon would be larger in touch mode. I'm trying to fix it for split tabs button. You can probably fix it after my WIP CL (https://crrev.com/c/7533005) is proved working. Just a heads up.

                      Youseff Bourouphel

                      Thanks! Will make the fix when I see your CL is working.

                      Line 21, Patchset 68: --cr-icon-button-icon-size: 20px;

                      --cr-icon-button-margin-end: 0;
                      --cr-icon-button-margin-start: 0;
                      --cr-icon-button-size: 34px;
                      Paul Jensen . resolved

                      Then we can remove these lines
                      ```suggestion
                      ```

                      Youseff Bourouphel

                      Done

                      File chrome/browser/ui/views/toolbar/webui_back_forward_control.cc
                      Line 41, Patchset 68: menu_model_.get(), views::MenuRunner::CONTEXT_MENU);
                      Qingxin Wu . resolved

                      should this be `views::MenuRunner::HAS_MNEMONICS`?

                      From my understanding, BackForwardButton relies on ToolbarButton::ShowContextMenuForViewImpl (for right-click) or ToolbarButton::OnMousePressed (for long-press), which both call ShowDropDownMenu. ShowDropDownMenu calls `ShowMenuForModel` [0], which creates its MenuRunner with HAS_MNEMONICS. I was fixing the context menu for split tabs button's right click as well, but let me know if I missunderstood how the Views buttons work.


                      [0] https://crsrc.org/c/chrome/browser/ui/views/toolbar/toolbar_button.cc;drc=2b771af51257844d0ff230fd7b5f49815226ea7c;l=602

                      Youseff Bourouphel

                      interesting, thanks for pointing this out!

                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.h
                      Line 103, Patchset 68: bool did_recover_from_previous_termination_ = false;
                      Qingxin Wu . resolved

                      seems to be refactor issue. This has been removed in https://chromium-review.googlesource.com/c/chromium/src/+/7541177

                      Youseff Bourouphel

                      Done

                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                      Line 188, Patchset 68: if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
                      Qingxin Wu . resolved

                      we should use features::IsWebUIBackForwardButtonEnabled? same below

                      Youseff Bourouphel

                      Done

                      Line 191, Patchset 68: if (forward_control_.GetVisible()) {
                      button_count++;
                      }
                      Qingxin Wu . resolved

                      nit: `button_count += forward_control_.GetVisible();`

                      Youseff Bourouphel

                      Done

                      Line 188, Patchset 68: if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {

                      // Back button is always visible.
                      button_count++;
                      if (forward_control_.GetVisible()) {
                      button_count++;
                      }
                      }
                      Paul Jensen . resolved
                      to be more like above code
                      ```suggestion
                      button_count += base::FeatureList::IsEnabled(features::kWebUIBackForwardButton);
                      button_count += base::FeatureList::IsEnabled(features::kWebUIBackForwardButton) &&
                      forward_control_.GetVisible();
                      ```
                      Youseff Bourouphel

                      Done

                      Line 283, Patchset 68:WebUIBackForwardControl* WebUIToolbarWebView::GetBackControl() {

                      return &back_control_;
                      }

                      WebUIBackForwardControl* WebUIToolbarWebView::GetForwardControl() {
                      return &forward_control_;
                      }
                      Paul Jensen . resolved

                      can we move these up so they're next to GetReloadControl()?

                      Youseff Bourouphel

                      Done

                      File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.h
                      Line 118, Patchset 68: // MetricsReporterService lifetime is tied to `web_contents_` which can be
                      Paul Jensen . resolved

                      why are we removing the comma?

                      Youseff Bourouphel

                      Mistake. Reverted

                      Line 67, Patchset 68: void SetBackForwardButtonState(bool back_enabled,

                      bool back_visible,
                      bool forward_enabled,
                      bool forward_visible);
                      Paul Jensen . resolved
                      ```suggestion
                      void SetBackForwardButtonState(browser_controls_api::mojom::ButtonState back_state,
                      browser_controls_api::mojom::ButtonState forward_state);
                      ```
                      Youseff Bourouphel

                      Done

                      Line 41, Patchset 68: virtual void GetBackForwardButtonStates(bool* back_enabled,

                      bool* back_visible,
                      bool* forward_enabled,
                      bool* forward_visible) = 0;
                      Paul Jensen . resolved
                      ```suggestion
                      virtual void GetBackForwardButtonStates(browser_controls_api::mojom::ButtonStatePtr back_state,
                      browser_controls_api::mojom::ButtonStatePtr forward_state) = 0;
                      ```
                      Youseff Bourouphel

                      Done

                      File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.cc
                      Line 144, Patchset 68: // Gets the argument time immediately after executing the command.
                      Paul Jensen . resolved

                      why this change?

                      Youseff Bourouphel

                      Mistake. Reverted.

                      Line 144, Patchset 68: // Gets the argument time immediately after executing the command.
                      Qingxin Wu . resolved

                      what does this "argument time" mean

                      Youseff Bourouphel

                      mistake, i reverted.

                      File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.h
                      Line 60, Patchset 68: void SetBackForwardButtonState(bool back_enabled,

                      bool back_visible,
                      bool forward_enabled,
                      bool forward_visible);
                      Paul Jensen . resolved
                      ```suggestion
                      void SetBackForwardButtonState(browser_controls_api::mojom::ButtonState back_state,
                      browser_controls_api::mojom::ButtonState forward_state);
                      ```
                      Youseff Bourouphel

                      Done

                      File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
                      Line 70, Patchset 68: source->AddBoolean(

                      "backForwardButtonEnabled",
                      base::FeatureList::IsEnabled(features::kWebUIBackForwardButton));
                      Paul Jensen . resolved

                      can we move this down beside the enableReloadButton code below?

                      Youseff Bourouphel

                      Done

                      Line 79, Patchset 68: source->AddBoolean("backEnabled",

                      chrome::IsCommandEnabled(browser, IDC_BACK));
                      source->AddBoolean("forwardEnabled",
                      chrome::IsCommandEnabled(browser, IDC_FORWARD));
                      Paul Jensen . resolved

                      I'm told LoadTimeData should not be used for things that are not constant across a browser session (i.e. basically should only be used for feature flags and localized strings). Can we get rid of this code and rely on the getBackForwardState() call in the back_forward_button.ts constructor?

                      Youseff Bourouphel

                      Done

                      File components/browser_apis/browser_controls/browser_controls_api.mojom
                      Line 87, Patchset 68: // Notifies that the back button was hovered.
                      Paul Jensen . resolved

                      This comment says back button only, but the API takes a control type. Perhaps we should change the API to just be `BackButtonHovered()`?

                      Youseff Bourouphel

                      Done

                      File ui/webui/resources/cr_elements/cr_icons_lit.css
                      Line 16, Patchset 68: transform: scaleX(-1);
                      Paul Jensen . resolved
                      Can we move this into back_forward_button.css?  e.g. hardcode the icon as the forward one but then add some conditional CSS like:
                      ```
                      blah[direction=back] {
                      transform: scaleX(-1);
                      }
                      ```
                      Youseff Bourouphel

                      Done

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Paul Jensen
                      • Qingxin Wu
                      Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                        Gerrit-Change-Number: 7466673
                        Gerrit-PatchSet: 70
                        Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                        Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                        Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                        Gerrit-CC: Qingxin Wu <qing...@google.com>
                        Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                        Gerrit-Attention: Qingxin Wu <qing...@google.com>
                        Gerrit-Comment-Date: Mon, 09 Feb 2026 19:48:15 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
                        Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Qingxin Wu (Gerrit)

                        unread,
                        Feb 9, 2026, 3:19:28 PM (12 days ago) Feb 9
                        to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                        Attention needed from Paul Jensen

                        Qingxin Wu added 1 comment

                        File chrome/browser/resources/webui_toolbar/back_forward_button.css
                        Line 24, Patchset 68: --cr-icon-button-size: 34px;
                        Qingxin Wu . resolved

                        I guess your buttons would have the same touch mode issue, where the icon would be larger in touch mode. I'm trying to fix it for split tabs button. You can probably fix it after my WIP CL (https://crrev.com/c/7533005) is proved working. Just a heads up.

                        Youseff Bourouphel

                        Thanks! Will make the fix when I see your CL is working.

                        Qingxin Wu

                        yeah I think a separate CL to fix it is fine, or even preferred. Just a heads up that this needs to be fixed.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Paul Jensen
                        Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                        Gerrit-Change-Number: 7466673
                        Gerrit-PatchSet: 71
                        Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                        Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                        Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                        Gerrit-CC: Qingxin Wu <qing...@google.com>
                        Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                        Gerrit-Comment-Date: Mon, 09 Feb 2026 20:19:24 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Paul Jensen (Gerrit)

                        unread,
                        Feb 10, 2026, 9:08:54 AM (11 days ago) Feb 10
                        to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                        Attention needed from Qingxin Wu and Youseff Bourouphel

                        Paul Jensen added 20 comments

                        File chrome/browser/BUILD.gn
                        File-level comment, Patchset 71 (Latest):
                        Paul Jensen . unresolved

                        why are the changes in this file necessary?

                        File chrome/browser/resources/webui_toolbar/BUILD.gn
                        Line 34, Patchset 71 (Latest): "app.css",
                        Paul Jensen . unresolved

                        why is this moved down?

                        File chrome/browser/resources/webui_toolbar/app.html.ts
                        Line 12, Patchset 68: ${this.backForwardButtonEnabled_ ? html`
                        Paul Jensen . unresolved

                        ditto
                        ```suggestion
                        ${this.backForwardButtonEnabled_ ? html`
                        ```

                        Youseff Bourouphel

                        Done

                        Paul Jensen

                        This doesn't look done.

                        File chrome/browser/resources/webui_toolbar/back_forward_button.css
                        Line 7, Patchset 71 (Latest): * #scheme=relative
                        * #import=//resources/cr_elements/cr_icons_lit.css.js
                        * #import=//resources/cr_elements/cr_hidden_style_lit.css.js
                        * #include=cr-icons-lit cr-hidden-style-lit
                        Paul Jensen . unresolved

                        can we make this the same as split_tabs_button.css header? e.g. do we need cr_icons_lit.css?

                        File chrome/browser/ui/views/toolbar/back_forward_control.h
                        Line 39, Patchset 71 (Latest): virtual views::View* AsView() = 0;
                        Paul Jensen . unresolved
                        Another alternative is to remove this method and make test cast to views::View.
                        ```suggestion
                        virtual views::View* AsViewForTesting() = 0;
                        ```
                        File chrome/browser/ui/views/toolbar/toolbar_view.cc
                        Line 320, Patchset 71 (Latest): auto toolbar_webview = std::make_unique<WebUIToolbarWebView>(

                        browser_, browser_->command_controller());
                        toolbar_webview_ = AddChildView(std::move(toolbar_webview));
                        Paul Jensen . unresolved

                        are these changes necessary?

                        File chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
                        Line 357, Patchset 71 (Latest): if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
                        Paul Jensen . unresolved

                        Given that kWebUIBackForwardButton isn't enabled by default, do we need this code? I suspect we may want to change this test to work with the WebUI back/forward buttons rather than just disable it, but that can be done later.

                        File chrome/browser/ui/views/toolbar/webui_back_forward_control.cc
                        Line 20, Patchset 71 (Latest): // Menu model will be initialized when showing the menu to ensure it's up to
                        Paul Jensen . unresolved

                        what do you mean by "up to date"? I don't see any changes to the menu model or runner below. If there aren't any changes, can we move the construction of menu_model_ and menu_runner_ into this constructor and make them actual class members rather than unique_ptrs?

                        File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                        Line 288, Patchset 71 (Latest): browser_controls_api::mojom::ButtonState back_state;
                        back_state.enabled = back_control_.GetEnabled();
                        back_state.visible = back_control_.GetVisible();
                        browser_controls_api::mojom::ButtonState forward_state;
                        forward_state.enabled = forward_control_.GetEnabled();
                        forward_state.visible = forward_control_.GetVisible();
                        Paul Jensen . unresolved

                        can we make this use GetBackForwardButtonStates()?

                        Line 309, Patchset 71 (Latest): UpdateBackForwardState();
                        Paul Jensen . unresolved

                        should this instead be PreferredSizeChanged()?

                        File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                        Line 375, Patchset 71 (Latest):class WebUIToolbarWebViewBackForwardBrowserTest : public InProcessBrowserTest {
                        Paul Jensen . unresolved

                        rather than create a new class, can we reuse WebUIToolbarWebViewPixelBrowserTest?

                        Line 399, Patchset 71 (Latest): content::ScopedAccessibilityModeOverride mode_override(ui::kAXModeComplete);
                        ui::TrackedElement* element = nullptr;
                        ASSERT_TRUE(base::test::RunUntil([&]() {
                        element = BrowserElements::From(browser())->GetElement(
                        kWebUIToolbarElementIdentifier);
                        return element != nullptr;
                        }));
                        ASSERT_TRUE(element);
                        views::TrackedElementViews* webui_toolbar_view_element =
                        element->AsA<views::TrackedElementViews>();
                        ASSERT_TRUE(webui_toolbar_view_element);
                        WebUIToolbarWebView* webui_toolbar_view =
                        views::AsViewClass<WebUIToolbarWebView>(
                        webui_toolbar_view_element->view());
                        ASSERT_TRUE(webui_toolbar_view);
                        views::WebView* web_view = views::AsViewClass<views::WebView>(
                        webui_toolbar_view->children()[0].get());
                        ASSERT_TRUE(web_view);
                        Paul Jensen . unresolved

                        can we replace this with WebUIToolbarWebViewPixelBrowserTest::SetUPWebUI()?

                        File chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.cc
                        Line 23, Patchset 71 (Latest):#include "chrome/browser/ui/views/toolbar/back_forward_control.h"
                        Paul Jensen . unresolved

                        why do we need this?

                        File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.h
                        Line 66, Patchset 71 (Latest): void SetBackForwardButtonState(
                        Paul Jensen . unresolved
                        ```suggestion
                        void OnBackForwardButtonStateChanged(
                        ```
                        File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                        Line 130, Patchset 71 (Latest):
                        Paul Jensen . unresolved

                        is there a reason to add this new line?

                        Line 374, Patchset 71 (Parent):
                        Paul Jensen . unresolved

                        is there a reason this was deleted?

                        File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.h
                        Line 64, Patchset 71 (Latest): void SetBackButtonLeadingMargin(int margin);
                        Paul Jensen . unresolved
                        ```suggestion
                        void OnBackButtonLeadingMarginChanged(int margin);
                        ```
                        Line 60, Patchset 71 (Latest): void SetBackForwardButtonState(
                        Paul Jensen . unresolved
                        ```suggestion
                        void OnBackForwardButtonStateChanged(
                        ```
                        File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
                        Line 82, Patchset 71 (Latest): base::FeatureList::IsEnabled(features::kWebUIBackForwardButton));
                        Paul Jensen . unresolved

                        can we use featuers::IsWebUIBackForward... like the above line does?

                        Line 84, Patchset 71 (Latest): BrowserWindowInterface* browser_interface =
                        Paul Jensen . unresolved

                        is there a need for this change or can we revert it?

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Qingxin Wu
                        • Youseff Bourouphel
                        Submit Requirements:
                          • requirement satisfiedCode-Coverage
                          • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                          Gerrit-Change-Number: 7466673
                          Gerrit-PatchSet: 71
                          Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                          Gerrit-CC: Qingxin Wu <qing...@google.com>
                          Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-Attention: Qingxin Wu <qing...@google.com>
                          Gerrit-Comment-Date: Tue, 10 Feb 2026 14:08:48 +0000
                          Gerrit-HasComments: Yes
                          Gerrit-Has-Labels: No
                          satisfied_requirement
                          unsatisfied_requirement
                          open
                          diffy

                          Youseff Bourouphel (Gerrit)

                          unread,
                          Feb 10, 2026, 10:57:26 AM (11 days ago) Feb 10
                          to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                          Attention needed from Paul Jensen and Qingxin Wu

                          Youseff Bourouphel added 7 comments

                          File chrome/browser/resources/webui_toolbar/BUILD.gn
                          Line 34, Patchset 71: "app.css",
                          Paul Jensen . resolved

                          why is this moved down?

                          Youseff Bourouphel

                          mistake

                          File chrome/browser/resources/webui_toolbar/app.html.ts
                          Line 12, Patchset 68: ${this.backForwardButtonEnabled_ ? html`
                          Paul Jensen . resolved

                          ditto
                          ```suggestion
                          ${this.backForwardButtonEnabled_ ? html`
                          ```

                          Youseff Bourouphel

                          Done

                          Paul Jensen

                          This doesn't look done.

                          Youseff Bourouphel

                          sorry not sure how I missed that, should be good now.

                          File chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc
                          Line 357, Patchset 71: if (base::FeatureList::IsEnabled(features::kWebUIBackForwardButton)) {
                          Paul Jensen . resolved

                          Given that kWebUIBackForwardButton isn't enabled by default, do we need this code? I suspect we may want to change this test to work with the WebUI back/forward buttons rather than just disable it, but that can be done later.

                          Youseff Bourouphel

                          Acknowledged. Added a todo instead.

                          File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                          Line 130, Patchset 71:
                          Paul Jensen . resolved

                          is there a reason to add this new line?

                          Youseff Bourouphel

                          formatting mistake.

                          Paul Jensen . resolved

                          is there a reason this was deleted?

                          Youseff Bourouphel

                          formatting accident.

                          File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.cc
                          Line 82, Patchset 71: base::FeatureList::IsEnabled(features::kWebUIBackForwardButton));
                          Paul Jensen . resolved

                          can we use featuers::IsWebUIBackForward... like the above line does?

                          Youseff Bourouphel

                          Done

                          Line 84, Patchset 71: BrowserWindowInterface* browser_interface =
                          Paul Jensen . resolved

                          is there a need for this change or can we revert it?

                          Youseff Bourouphel

                          Done

                          Open in Gerrit

                          Related details

                          Attention is currently required from:
                          • Paul Jensen
                          • Qingxin Wu
                          Submit Requirements:
                          • requirement satisfiedCode-Coverage
                          • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                          Gerrit-Change-Number: 7466673
                          Gerrit-PatchSet: 71
                          Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                          Gerrit-CC: Qingxin Wu <qing...@google.com>
                          Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                          Gerrit-Attention: Qingxin Wu <qing...@google.com>
                          Gerrit-Comment-Date: Tue, 10 Feb 2026 15:57:21 +0000
                          satisfied_requirement
                          unsatisfied_requirement
                          open
                          diffy

                          Youseff Bourouphel (Gerrit)

                          unread,
                          Feb 11, 2026, 10:09:09 AM (10 days ago) Feb 11
                          to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org

                          Youseff Bourouphel added 10 comments

                          Patchset-level comments
                          File-level comment, Patchset 74 (Latest):
                          Youseff Bourouphel . resolved

                          still working on the rest

                          File chrome/browser/resources/webui_toolbar/back_forward_button.css
                          Line 7, Patchset 71: * #scheme=relative

                          * #import=//resources/cr_elements/cr_icons_lit.css.js
                          * #import=//resources/cr_elements/cr_hidden_style_lit.css.js
                          * #include=cr-icons-lit cr-hidden-style-lit
                          Paul Jensen . resolved

                          can we make this the same as split_tabs_button.css header? e.g. do we need cr_icons_lit.css?

                          Youseff Bourouphel

                          Done, refactored to closer match split_tabs_button.css.

                          File chrome/browser/ui/views/toolbar/back_forward_control.h
                          Line 39, Patchset 71: virtual views::View* AsView() = 0;
                          Paul Jensen . resolved
                          Another alternative is to remove this method and make test cast to views::View.
                          ```suggestion
                          virtual views::View* AsViewForTesting() = 0;
                          ```
                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/views/toolbar/toolbar_view.cc
                          Line 320, Patchset 71: auto toolbar_webview = std::make_unique<WebUIToolbarWebView>(

                          browser_, browser_->command_controller());
                          toolbar_webview_ = AddChildView(std::move(toolbar_webview));
                          Paul Jensen . resolved

                          are these changes necessary?

                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                          Line 288, Patchset 71: browser_controls_api::mojom::ButtonState back_state;

                          back_state.enabled = back_control_.GetEnabled();
                          back_state.visible = back_control_.GetVisible();
                          browser_controls_api::mojom::ButtonState forward_state;
                          forward_state.enabled = forward_control_.GetEnabled();
                          forward_state.visible = forward_control_.GetVisible();
                          Paul Jensen . resolved

                          can we make this use GetBackForwardButtonStates()?

                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                          Line 375, Patchset 71:class WebUIToolbarWebViewBackForwardBrowserTest : public InProcessBrowserTest {
                          Paul Jensen . resolved

                          rather than create a new class, can we reuse WebUIToolbarWebViewPixelBrowserTest?

                          Youseff Bourouphel

                          Done, restructured some helpers to work for any button, to reduce code needed for this and future buttons.

                          Line 399, Patchset 71: content::ScopedAccessibilityModeOverride mode_override(ui::kAXModeComplete);

                          ui::TrackedElement* element = nullptr;
                          ASSERT_TRUE(base::test::RunUntil([&]() {
                          element = BrowserElements::From(browser())->GetElement(
                          kWebUIToolbarElementIdentifier);
                          return element != nullptr;
                          }));
                          ASSERT_TRUE(element);
                          views::TrackedElementViews* webui_toolbar_view_element =
                          element->AsA<views::TrackedElementViews>();
                          ASSERT_TRUE(webui_toolbar_view_element);
                          WebUIToolbarWebView* webui_toolbar_view =
                          views::AsViewClass<WebUIToolbarWebView>(
                          webui_toolbar_view_element->view());
                          ASSERT_TRUE(webui_toolbar_view);
                          views::WebView* web_view = views::AsViewClass<views::WebView>(
                          webui_toolbar_view->children()[0].get());
                          ASSERT_TRUE(web_view);
                          Paul Jensen . resolved

                          can we replace this with WebUIToolbarWebViewPixelBrowserTest::SetUPWebUI()?

                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/webui/webui_toolbar/browser_controls_service.h
                          Line 66, Patchset 71: void SetBackForwardButtonState(
                          Paul Jensen . resolved
                          ```suggestion
                          void OnBackForwardButtonStateChanged(
                          ```
                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/webui/webui_toolbar/webui_toolbar_ui.h
                          Line 64, Patchset 71: void SetBackButtonLeadingMargin(int margin);
                          Paul Jensen . resolved
                          ```suggestion
                          void OnBackButtonLeadingMarginChanged(int margin);
                          ```
                          Youseff Bourouphel

                          Done

                          Line 60, Patchset 71: void SetBackForwardButtonState(
                          Paul Jensen . resolved
                          ```suggestion
                          void OnBackForwardButtonStateChanged(
                          ```
                          Youseff Bourouphel

                          Done

                          Open in Gerrit

                          Related details

                          Attention set is empty
                          Submit Requirements:
                          • requirement satisfiedCode-Coverage
                          • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                          Gerrit-Change-Number: 7466673
                          Gerrit-PatchSet: 74
                          Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                          Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                          Gerrit-CC: Qingxin Wu <qing...@google.com>
                          Gerrit-Comment-Date: Wed, 11 Feb 2026 15:08:57 +0000
                          satisfied_requirement
                          unsatisfied_requirement
                          open
                          diffy

                          Youseff Bourouphel (Gerrit)

                          unread,
                          Feb 11, 2026, 4:29:31 PM (10 days ago) Feb 11
                          to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                          Attention needed from Paul Jensen

                          Youseff Bourouphel added 4 comments

                          File chrome/browser/BUILD.gn
                          File-level comment, Patchset 71:
                          Paul Jensen . resolved

                          why are the changes in this file necessary?

                          Youseff Bourouphel

                          Clean up to a redundant layer , which allows us not to need this.

                          File chrome/browser/ui/views/toolbar/webui_back_forward_control.cc
                          Line 20, Patchset 71: // Menu model will be initialized when showing the menu to ensure it's up to
                          Paul Jensen . resolved

                          what do you mean by "up to date"? I don't see any changes to the menu model or runner below. If there aren't any changes, can we move the construction of menu_model_ and menu_runner_ into this constructor and make them actual class members rather than unique_ptrs?

                          Youseff Bourouphel

                          I made `menu_model_` an actual class member to match the control's lifecycle. We still need to keep `menu_runner_` as a std::unique_ptr and recreate it in HandleContextMenu, though. views::MenuRunner is single-use, so creating a fresh instance ensures we don't carry over anything stale.

                          This resembles the native views version.
                          (https://crsrc.org/c/chrome/browser/ui/views/toolbar/toolbar_controller.cc;drc=04e6c0c420fdbc48f9ec2cf41a2ad739a949cca9;l=873)
                          File chrome/browser/ui/views/toolbar/webui_toolbar_web_view.cc
                          Line 309, Patchset 71: UpdateBackForwardState();
                          Paul Jensen . resolved

                          should this instead be PreferredSizeChanged()?

                          Youseff Bourouphel

                          Done

                          File chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.cc
                          Line 23, Patchset 71:#include "chrome/browser/ui/views/toolbar/back_forward_control.h"
                          Paul Jensen . resolved

                          why do we need this?

                          Youseff Bourouphel

                          Removed.

                          Open in Gerrit

                          Related details

                          Attention is currently required from:
                          • Paul Jensen
                          Submit Requirements:
                            • requirement satisfiedCode-Coverage
                            • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                            Gerrit-Change-Number: 7466673
                            Gerrit-PatchSet: 78
                            Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                            Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                            Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                            Gerrit-CC: Qingxin Wu <qing...@google.com>
                            Gerrit-Attention: Paul Jensen <paulj...@chromium.org>
                            Gerrit-Comment-Date: Wed, 11 Feb 2026 21:29:26 +0000
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Paul Jensen (Gerrit)

                            unread,
                            Feb 13, 2026, 10:57:25 AM (8 days ago) Feb 13
                            to Youseff Bourouphel, Chromium LUCI CQ, Qingxin Wu, AyeAye, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                            Attention needed from Youseff Bourouphel

                            Paul Jensen added 4 comments

                            Patchset-level comments
                            File-level comment, Patchset 86 (Latest):
                            Paul Jensen . resolved

                            This looks to be in good shape. Once you get the tests passing, fix the merge conflicts, and address my three small comments, and Qingxin also thinks it's in good shape, I think it's ready to break up into smaller CLs and start landing.

                            File chrome/browser/resources/webui_toolbar/back_forward_button.css
                            Line 12, Patchset 86 (Latest)::host {
                            Paul Jensen . unresolved
                            ```suggestion
                            /* TODO(crbug.com/470038385): Pass values from C++ instead of hard code when
                            * possible, and fix TouchUI mode */
                            /* TODO(crbug.com/479489814): Dedup this with split_tabs_button.css. */
                            :host {
                            ```
                            File chrome/browser/resources/webui_toolbar/back_forward_button.ts
                            Line 64, Patchset 86 (Latest): (backState: ButtonState, forwardState: ButtonState) => {
                            this.updateState_(backState, forwardState);
                            });
                            Paul Jensen . unresolved
                            ```suggestion
                            this.updateState_.bind(this));
                            ```
                            File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                            Line 414, Patchset 86 (Latest):
                            Paul Jensen . unresolved

                            should we first check that both buttons are disabled but visible?

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Youseff Bourouphel
                            Submit Requirements:
                              • requirement satisfiedCode-Coverage
                              • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                              Gerrit-Change-Number: 7466673
                              Gerrit-PatchSet: 86
                              Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                              Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                              Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                              Gerrit-CC: Qingxin Wu <qing...@google.com>
                              Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                              Gerrit-Comment-Date: Fri, 13 Feb 2026 15:57:18 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Qingxin Wu (Gerrit)

                              unread,
                              Feb 13, 2026, 7:12:41 PM (8 days ago) Feb 13
                              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                              Attention needed from Youseff Bourouphel

                              Qingxin Wu added 4 comments

                              File chrome/browser/resources/webui_toolbar/back_forward_button.ts
                              Line 24, Patchset 86 (Latest): return 'back-forward-button';
                              Qingxin Wu . unresolved

                              nit: the other two buttons were named "xxx-button-app". Not a big deal, but would be easier to read the code if we keep the naming consistent.

                              Line 48, Patchset 86 (Latest): private backForwardStatusChangedListenerId_: number|null = null;
                              Qingxin Wu . unresolved

                              do we need the ids separately? Can we just put them in an array, like what we did for split_tabs_button? https://crsrc.org/c/chrome/browser/resources/webui_toolbar/split_tabs_button.ts;drc=0dbc3db913d6e3fbbb1590fdb3847e6a3307f351;l=47
                              It's a little easier and more extensible.

                              Line 134, Patchset 86 (Latest): MenuSourceType.kMouse);
                              Qingxin Wu . unresolved

                              Since ToolbarButton also inherits ToolbarButotn [0] and does not define its own handling of context menu, it goes through ToobarButton's implementation which differentiates event sources (e.g., mouse, touch, keyboard). We may also need to handle the event source type (such as touch event), as I'm doing in https://crrev.com/c/7556010 for split tabs button. We can do it in a separate CL after my CL lands. But let me know if I misunderstood how the Views back forward button handled context menu event's event source.

                              [0] https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.h;drc=f4444aabb29a2cd1366910a6aaf7b0f4ef19a148;l=15

                              Line 139, Patchset 86 (Latest): if (e.button !== 0) { // Only left click for long press
                              Qingxin Wu . unresolved

                              nit: reload_button.ts defined constants like BUTTON_LEFT. Probably good to move that to the toolbar_button.ts, and let both files use those constants.

                              Gerrit-Comment-Date: Sat, 14 Feb 2026 00:12:36 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Qingxin Wu (Gerrit)

                              unread,
                              Feb 13, 2026, 7:21:48 PM (8 days ago) Feb 13
                              to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                              Attention needed from Youseff Bourouphel

                              Qingxin Wu added 1 comment

                              File chrome/browser/resources/webui_toolbar/back_forward_button.html.ts
                              Line 14, Patchset 86 (Latest): aria-label="${this.ariaLabel_}"
                              title="${this.ariaLabel_}"
                              Qingxin Wu . unresolved

                              are their values both this.ariaLabel_? Should title be backButtonTooltip?
                              https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.cc;drc=57b039617d6f75845e77204b61838efd868be036;l=44
                              You passed backButtonTooltip from C++ side, but seems you didn't use it in the front end code

                              Gerrit-Comment-Date: Sat, 14 Feb 2026 00:21:42 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Youseff Bourouphel (Gerrit)

                              unread,
                              Feb 17, 2026, 11:25:46 AM (4 days ago) Feb 17
                              to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                              Attention needed from Qingxin Wu

                              Youseff Bourouphel added 8 comments

                              File chrome/browser/resources/webui_toolbar/back_forward_button.css
                              Line 12, Patchset 86::host {
                              Paul Jensen . resolved
                              ```suggestion
                              /* TODO(crbug.com/470038385): Pass values from C++ instead of hard code when
                              * possible, and fix TouchUI mode */
                              /* TODO(crbug.com/479489814): Dedup this with split_tabs_button.css. */
                              :host {
                              ```
                              Youseff Bourouphel

                              Done

                              File chrome/browser/resources/webui_toolbar/back_forward_button.html.ts
                              Line 14, Patchset 86: aria-label="${this.ariaLabel_}"
                              title="${this.ariaLabel_}"
                              Qingxin Wu . resolved

                              are their values both this.ariaLabel_? Should title be backButtonTooltip?
                              https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.cc;drc=57b039617d6f75845e77204b61838efd868be036;l=44
                              You passed backButtonTooltip from C++ side, but seems you didn't use it in the front end code

                              Youseff Bourouphel

                              Done

                              File chrome/browser/resources/webui_toolbar/back_forward_button.ts
                              Line 24, Patchset 86: return 'back-forward-button';
                              Qingxin Wu . resolved

                              nit: the other two buttons were named "xxx-button-app". Not a big deal, but would be easier to read the code if we keep the naming consistent.

                              Youseff Bourouphel

                              Done

                              Line 48, Patchset 86: private backForwardStatusChangedListenerId_: number|null = null;
                              Qingxin Wu . resolved

                              do we need the ids separately? Can we just put them in an array, like what we did for split_tabs_button? https://crsrc.org/c/chrome/browser/resources/webui_toolbar/split_tabs_button.ts;drc=0dbc3db913d6e3fbbb1590fdb3847e6a3307f351;l=47
                              It's a little easier and more extensible.

                              Youseff Bourouphel

                              Done

                              Line 64, Patchset 86: (backState: ButtonState, forwardState: ButtonState) => {
                              this.updateState_(backState, forwardState);
                              });
                              Paul Jensen . resolved
                              ```suggestion
                              this.updateState_.bind(this));
                              ```
                              Youseff Bourouphel

                              Done

                              Line 134, Patchset 86: MenuSourceType.kMouse);
                              Qingxin Wu . resolved

                              Since ToolbarButton also inherits ToolbarButotn [0] and does not define its own handling of context menu, it goes through ToobarButton's implementation which differentiates event sources (e.g., mouse, touch, keyboard). We may also need to handle the event source type (such as touch event), as I'm doing in https://crrev.com/c/7556010 for split tabs button. We can do it in a separate CL after my CL lands. But let me know if I misunderstood how the Views back forward button handled context menu event's event source.

                              [0] https://crsrc.org/c/chrome/browser/ui/views/toolbar/back_forward_button.h;drc=f4444aabb29a2cd1366910a6aaf7b0f4ef19a148;l=15

                              Youseff Bourouphel

                              Done

                              Line 139, Patchset 86: if (e.button !== 0) { // Only left click for long press
                              Qingxin Wu . resolved

                              nit: reload_button.ts defined constants like BUTTON_LEFT. Probably good to move that to the toolbar_button.ts, and let both files use those constants.

                              Youseff Bourouphel

                              Done

                              File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                              Line 414, Patchset 86:
                              Paul Jensen . resolved

                              should we first check that both buttons are disabled but visible?

                              Youseff Bourouphel

                              Done

                              Open in Gerrit

                              Related details

                              Attention is currently required from:
                              • Qingxin Wu
                              Submit Requirements:
                                • requirement satisfiedCode-Coverage
                                • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                Gerrit-Change-Number: 7466673
                                Gerrit-PatchSet: 89
                                Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                Gerrit-CC: Qingxin Wu <qing...@google.com>
                                Gerrit-Attention: Qingxin Wu <qing...@google.com>
                                Gerrit-Comment-Date: Tue, 17 Feb 2026 16:25:40 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                Comment-In-Reply-To: Paul Jensen <paulj...@chromium.org>
                                Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                                satisfied_requirement
                                unsatisfied_requirement
                                open
                                diffy

                                Qingxin Wu (Gerrit)

                                unread,
                                Feb 17, 2026, 1:57:56 PM (4 days ago) Feb 17
                                to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                Attention needed from Youseff Bourouphel

                                Qingxin Wu added 5 comments

                                File chrome/browser/ui/ui_features.h
                                Line 377, Patchset 91 (Latest):bool IsWebUIBackForwardButtonEnabled();
                                Qingxin Wu . unresolved

                                these changes were already submitted in the feature flag CL, right?

                                File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                                Line 42, Patchset 91 (Latest):using ::testing::DoAll;
                                Qingxin Wu . unresolved

                                what are this and the setargpointee used for?

                                Line 96, Patchset 91 (Latest): MOCK_METHOD(void,
                                BackNavigationLikely,
                                Qingxin Wu . unresolved

                                is this the reason we created MockWebContents instead of just using content::WebContentsTester::CreateTestWebContents? Is it possible to add this to CreateTestWebContents if we have to?

                                Line 169, Patchset 91 (Latest): MockWebContents& mock_web_contents() {
                                return *static_cast<MockWebContents*>(web_contents_.get());
                                }
                                Qingxin Wu . unresolved

                                what's this used for? I don't see it being used

                                Line 373, Patchset 91 (Latest):// Tests that calling Forward() with NEW_BACKGROUND_TAB executes the IDC_FORWARD
                                Qingxin Wu . unresolved

                                kMiddleMouseButton? Same to comments of other tests as well.

                                Open in Gerrit

                                Related details

                                Attention is currently required from:
                                • Youseff Bourouphel
                                Submit Requirements:
                                  • requirement satisfiedCode-Coverage
                                  • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                  Gerrit-Change-Number: 7466673
                                  Gerrit-PatchSet: 91
                                  Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                  Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                  Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                  Gerrit-CC: Qingxin Wu <qing...@google.com>
                                  Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                                  Gerrit-Comment-Date: Tue, 17 Feb 2026 18:57:51 +0000
                                  Gerrit-HasComments: Yes
                                  Gerrit-Has-Labels: No
                                  satisfied_requirement
                                  unsatisfied_requirement
                                  open
                                  diffy

                                  Youseff Bourouphel (Gerrit)

                                  unread,
                                  Feb 17, 2026, 2:37:17 PM (4 days ago) Feb 17
                                  to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                  Attention needed from Qingxin Wu

                                  Youseff Bourouphel added 5 comments

                                  File chrome/browser/ui/ui_features.h
                                  Line 377, Patchset 91:bool IsWebUIBackForwardButtonEnabled();
                                  Qingxin Wu . resolved

                                  these changes were already submitted in the feature flag CL, right?

                                  Youseff Bourouphel

                                  missed that from the rebase sorry!

                                  File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                                  Line 42, Patchset 91:using ::testing::DoAll;
                                  Qingxin Wu . resolved

                                  what are this and the setargpointee used for?

                                  Youseff Bourouphel

                                  outdated should have been removed before sorry.

                                  Line 96, Patchset 91: MOCK_METHOD(void,
                                  BackNavigationLikely,
                                  Qingxin Wu . resolved

                                  is this the reason we created MockWebContents instead of just using content::WebContentsTester::CreateTestWebContents? Is it possible to add this to CreateTestWebContents if we have to?

                                  Youseff Bourouphel

                                  Done

                                  Line 169, Patchset 91: MockWebContents& mock_web_contents() {
                                  return *static_cast<MockWebContents*>(web_contents_.get());
                                  }
                                  Qingxin Wu . resolved

                                  what's this used for? I don't see it being used

                                  Youseff Bourouphel

                                  Done

                                  Line 373, Patchset 91:// Tests that calling Forward() with NEW_BACKGROUND_TAB executes the IDC_FORWARD
                                  Qingxin Wu . resolved

                                  kMiddleMouseButton? Same to comments of other tests as well.

                                  Youseff Bourouphel

                                  Done

                                  Open in Gerrit

                                  Related details

                                  Attention is currently required from:
                                  • Qingxin Wu
                                  Submit Requirements:
                                    • requirement satisfiedCode-Coverage
                                    • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                    Gerrit-Change-Number: 7466673
                                    Gerrit-PatchSet: 94
                                    Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                    Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                    Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                    Gerrit-CC: Qingxin Wu <qing...@google.com>
                                    Gerrit-Attention: Qingxin Wu <qing...@google.com>
                                    Gerrit-Comment-Date: Tue, 17 Feb 2026 19:37:12 +0000
                                    Gerrit-HasComments: Yes
                                    Gerrit-Has-Labels: No
                                    Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                                    satisfied_requirement
                                    unsatisfied_requirement
                                    open
                                    diffy

                                    Qingxin Wu (Gerrit)

                                    unread,
                                    Feb 18, 2026, 9:13:46 AM (3 days ago) Feb 18
                                    to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                    Attention needed from Youseff Bourouphel

                                    Qingxin Wu added 5 comments

                                    Patchset-level comments
                                    File-level comment, Patchset 95 (Latest):
                                    Qingxin Wu . resolved

                                    generally LGTM with the last few comments.

                                    File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                                    Line 78, Patchset 95 (Latest):std::string GetButtonAppJS(const std::string& selector) {
                                    Qingxin Wu . unresolved

                                    mind separating the changes of the following three functions to a separate CL? I have a CL that also needs the exact change, so a separate CL would be helpful.

                                    Line 123, Patchset 95 (Latest):void EnableForwardButton(Browser* browser, views::WebView* web_view) {
                                    Qingxin Wu . unresolved

                                    nit: let's rename it to PinForwardButton. I'm also renaming EnableSplitTabsButton.

                                    Line 510, Patchset 95 (Latest):
                                    Qingxin Wu . unresolved

                                    remove the extra empty line.
                                    And did you try running the test on mac locally? Did it fail?

                                    File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                                    Line 371, Patchset 95 (Latest):// Tests that calling Forward() with CURRENT_TAB executes the IDC_FORWARD
                                    Qingxin Wu . unresolved

                                    is current_tab a default parameter for forward? Forward seems takes an empty {} here.

                                    Open in Gerrit

                                    Related details

                                    Attention is currently required from:
                                    • Youseff Bourouphel
                                    Submit Requirements:
                                      • requirement satisfiedCode-Coverage
                                      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                      Gerrit-Change-Number: 7466673
                                      Gerrit-PatchSet: 95
                                      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                      Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                      Gerrit-CC: Qingxin Wu <qing...@google.com>
                                      Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                                      Gerrit-Comment-Date: Wed, 18 Feb 2026 14:13:41 +0000
                                      Gerrit-HasComments: Yes
                                      Gerrit-Has-Labels: No
                                      satisfied_requirement
                                      unsatisfied_requirement
                                      open
                                      diffy

                                      Youseff Bourouphel (Gerrit)

                                      unread,
                                      Feb 18, 2026, 1:42:55 PM (3 days ago) Feb 18
                                      to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                      Attention needed from Qingxin Wu

                                      Youseff Bourouphel added 4 comments

                                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                                      Line 78, Patchset 95:std::string GetButtonAppJS(const std::string& selector) {
                                      Qingxin Wu . resolved

                                      mind separating the changes of the following three functions to a separate CL? I have a CL that also needs the exact change, so a separate CL would be helpful.

                                      Youseff Bourouphel

                                      This CL is huge, I am working on smaller CLs and so this would probably get broken up, (if your CL doesn't beat me to it).

                                      Line 123, Patchset 95:void EnableForwardButton(Browser* browser, views::WebView* web_view) {
                                      Qingxin Wu . resolved

                                      nit: let's rename it to PinForwardButton. I'm also renaming EnableSplitTabsButton.

                                      Youseff Bourouphel

                                      Done

                                      Qingxin Wu . unresolved

                                      remove the extra empty line.
                                      And did you try running the test on mac locally? Did it fail?

                                      Youseff Bourouphel

                                      Removed the line and I did not test local directly, but it fails the trybots mac tests (https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/2522594/overview).

                                      I added tests for Mac specifically since it has different behavior. Let me know if you think that is not suffice.

                                      File chrome/browser/ui/webui/webui_toolbar/browser_controls_service_unittest.cc
                                      Line 371, Patchset 95:// Tests that calling Forward() with CURRENT_TAB executes the IDC_FORWARD
                                      Qingxin Wu . resolved

                                      is current_tab a default parameter for forward? Forward seems takes an empty {} here.

                                      Youseff Bourouphel

                                      Yes, CURRENT_TAB is the default disposition for the Forward method when an empty set of ClickDispositionFlags is provided.

                                      ```
                                      void BrowserControlsService::Forward(
                                      const std::vector<browser_controls_api::mojom::ClickDispositionFlag>&
                                      flags) {
                                      command_updater_->ExecuteCommandWithDisposition(
                                      IDC_FORWARD, ui::DispositionFromEventFlags(ToUIEventFlags(flags)));
                                      }
                                      ```

                                      ui::DispositionFromEventFlags by default is current_tab. As seen here: https://crsrc.org/c/ui/base/window_open_disposition_utils.h;l=31

                                      I changed the comment to better reflect this.

                                      Open in Gerrit

                                      Related details

                                      Attention is currently required from:
                                      • Qingxin Wu
                                      Submit Requirements:
                                      • requirement satisfiedCode-Coverage
                                      • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                      Gerrit-Change-Number: 7466673
                                      Gerrit-PatchSet: 96
                                      Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                      Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                      Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                      Gerrit-CC: Qingxin Wu <qing...@google.com>
                                      Gerrit-Attention: Qingxin Wu <qing...@google.com>
                                      Gerrit-Comment-Date: Wed, 18 Feb 2026 18:42:50 +0000
                                      Gerrit-HasComments: Yes
                                      Gerrit-Has-Labels: No
                                      Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                                      satisfied_requirement
                                      unsatisfied_requirement
                                      open
                                      diffy

                                      Qingxin Wu (Gerrit)

                                      unread,
                                      Feb 18, 2026, 3:44:18 PM (3 days ago) Feb 18
                                      to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                      Attention needed from Youseff Bourouphel

                                      Qingxin Wu added 2 comments

                                      File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                                      Line 78, Patchset 95:std::string GetButtonAppJS(const std::string& selector) {
                                      Qingxin Wu . resolved

                                      mind separating the changes of the following three functions to a separate CL? I have a CL that also needs the exact change, so a separate CL would be helpful.

                                      Youseff Bourouphel

                                      This CL is huge, I am working on smaller CLs and so this would probably get broken up, (if your CL doesn't beat me to it).

                                      Qingxin Wu

                                      probably good to have a small CL to just refactor these functions. I'll wait for you doing that, since you already made the change.

                                      Line 510, Patchset 95:
                                      Qingxin Wu . resolved

                                      remove the extra empty line.
                                      And did you try running the test on mac locally? Did it fail?

                                      Youseff Bourouphel

                                      Removed the line and I did not test local directly, but it fails the trybots mac tests (https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/2522594/overview).

                                      I added tests for Mac specifically since it has different behavior. Let me know if you think that is not suffice.

                                      Qingxin Wu

                                      ok, as long as it did fail on mac.

                                      Open in Gerrit

                                      Related details

                                      Attention is currently required from:
                                      • Youseff Bourouphel
                                      Submit Requirements:
                                        • requirement satisfiedCode-Coverage
                                        • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                        Gerrit-Change-Number: 7466673
                                        Gerrit-PatchSet: 97
                                        Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                        Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                        Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                        Gerrit-CC: Qingxin Wu <qing...@google.com>
                                        Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                                        Gerrit-Comment-Date: Wed, 18 Feb 2026 20:44:12 +0000
                                        Gerrit-HasComments: Yes
                                        satisfied_requirement
                                        unsatisfied_requirement
                                        open
                                        diffy

                                        Qingxin Wu (Gerrit)

                                        unread,
                                        Feb 18, 2026, 3:56:47 PM (3 days ago) Feb 18
                                        to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                        Attention needed from Youseff Bourouphel

                                        Qingxin Wu added 1 comment

                                        File chrome/browser/ui/views/toolbar/webui_toolbar_web_view_browsertest.cc
                                        Line 78, Patchset 95:std::string GetButtonAppJS(const std::string& selector) {
                                        Qingxin Wu . resolved

                                        mind separating the changes of the following three functions to a separate CL? I have a CL that also needs the exact change, so a separate CL would be helpful.

                                        Youseff Bourouphel

                                        This CL is huge, I am working on smaller CLs and so this would probably get broken up, (if your CL doesn't beat me to it).

                                        Qingxin Wu

                                        probably good to have a small CL to just refactor these functions. I'll wait for you doing that, since you already made the change.

                                        Qingxin Wu

                                        unless you want me to do it, either is fine for me.

                                        Gerrit-Comment-Date: Wed, 18 Feb 2026 20:56:41 +0000
                                        satisfied_requirement
                                        unsatisfied_requirement
                                        open
                                        diffy

                                        Qingxin Wu (Gerrit)

                                        unread,
                                        Feb 20, 2026, 1:23:17 PM (yesterday) Feb 20
                                        to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                        Attention needed from Youseff Bourouphel

                                        Qingxin Wu added 1 comment

                                        File components/browser_apis/browser_controls/browser_controls_api.mojom
                                        Line 75, Patchset 107 (Latest): GetBackForwardState() => (ButtonState back_state, ButtonState forward_state);
                                        Qingxin Wu . unresolved

                                        Paul made a major redesign for this inital state solution in https://chromium-review.googlesource.com/c/chromium/src/+/7552473. There are no Getxxx mojo APIs anymore. Sorry to say that, but this should also be updated to follow the new design. We can probably add a todo and change this in a separate CL if this method is not broken by that and if you're really tired of making changes in this CL :)

                                        Open in Gerrit

                                        Related details

                                        Attention is currently required from:
                                        • Youseff Bourouphel
                                        Submit Requirements:
                                          • requirement satisfiedCode-Coverage
                                          • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                          Gerrit-Change-Number: 7466673
                                          Gerrit-PatchSet: 107
                                          Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                          Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                          Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                          Gerrit-CC: Qingxin Wu <qing...@google.com>
                                          Gerrit-Attention: Youseff Bourouphel <ybouro...@google.com>
                                          Gerrit-Comment-Date: Fri, 20 Feb 2026 18:23:14 +0000
                                          Gerrit-HasComments: Yes
                                          Gerrit-Has-Labels: No
                                          satisfied_requirement
                                          unsatisfied_requirement
                                          open
                                          diffy

                                          Qingxin Wu (Gerrit)

                                          unread,
                                          Feb 20, 2026, 2:59:33 PM (23 hours ago) Feb 20
                                          to Youseff Bourouphel, Chromium LUCI CQ, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                          Attention needed from Youseff Bourouphel

                                          Qingxin Wu added 7 comments

                                          File chrome/browser/resources/webui_toolbar/browser_proxy.ts
                                          Line 31, Patchset 107: callbackRouter: BrowserControlsObserverCallbackRouter;
                                          Qingxin Wu . unresolved

                                          why adding this?

                                          Line 48, Patchset 107 (Parent): private callbackRouter: BrowserControlsObserverCallbackRouter;
                                          Qingxin Wu . unresolved

                                          why removing this, probably rebase mistake?

                                          File chrome/browser/ui/views/frame/toolbar_button_provider.h
                                          Line 100, Patchset 107: virtual BackForwardButton* GetBackButton() = 0;
                                          Qingxin Wu . unresolved

                                          why do we need to change this?

                                          File chrome/browser/ui/views/toolbar/toolbar_view.h
                                          Line 159, Patchset 107: BackForwardButton* forward_button() const { return forward_; }
                                          Qingxin Wu . unresolved

                                          can these stay as ToolbarButton, or is there a reason we have to change these?

                                          File chrome/browser/ui/views/toolbar/toolbar_view.cc
                                          Line 433, Patchset 107: } else {
                                          back_ = nullptr;
                                          forward_ = nullptr;
                                          }
                                          Qingxin Wu . unresolved

                                          they're nullptr by default.

                                          Line 1030, Patchset 107: back_button_height) +
                                          Qingxin Wu . unresolved

                                          just inline `GetBackForwardButtonSize().height()`?

                                          Line 1033, Patchset 107 (Parent): back_->GetMinimumSize().height()) +
                                          Qingxin Wu . unresolved

                                          this is MinimumSize, not PreferredSize which GetBackForwardButtonSize returns

                                          Gerrit-Comment-Date: Fri, 20 Feb 2026 19:59:28 +0000
                                          Gerrit-HasComments: Yes
                                          Gerrit-Has-Labels: No
                                          satisfied_requirement
                                          unsatisfied_requirement
                                          open
                                          diffy

                                          Youseff Bourouphel (Gerrit)

                                          unread,
                                          Feb 20, 2026, 5:58:46 PM (20 hours ago) Feb 20
                                          to Chromium LUCI CQ, Qingxin Wu, AyeAye, Paul Jensen, chromium...@chromium.org, cblume...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, fuzzin...@chromium.org, penghuan...@chromium.org, devtools...@chromium.org, chrome-intelligence-te...@google.com, oshima...@chromium.org
                                          Attention needed from Qingxin Wu

                                          Youseff Bourouphel added 8 comments

                                          File chrome/browser/resources/webui_toolbar/browser_proxy.ts
                                          Line 31, Patchset 107: callbackRouter: BrowserControlsObserverCallbackRouter;
                                          Qingxin Wu . resolved

                                          why adding this?

                                          Youseff Bourouphel

                                          I must've messed up the rebase as this was part of whats below

                                          Line 48, Patchset 107 (Parent): private callbackRouter: BrowserControlsObserverCallbackRouter;
                                          Qingxin Wu . resolved

                                          why removing this, probably rebase mistake?

                                          Youseff Bourouphel

                                          Done

                                          File chrome/browser/ui/views/frame/toolbar_button_provider.h
                                          Line 100, Patchset 107: virtual BackForwardButton* GetBackButton() = 0;
                                          Qingxin Wu . resolved

                                          why do we need to change this?

                                          Youseff Bourouphel

                                          Done

                                          File chrome/browser/ui/views/toolbar/toolbar_view.h
                                          Line 159, Patchset 107: BackForwardButton* forward_button() const { return forward_; }
                                          Qingxin Wu . resolved

                                          can these stay as ToolbarButton, or is there a reason we have to change these?

                                          Youseff Bourouphel

                                          Done

                                          File chrome/browser/ui/views/toolbar/toolbar_view.cc
                                          Line 433, Patchset 107: } else {
                                          back_ = nullptr;
                                          forward_ = nullptr;
                                          }
                                          Qingxin Wu . resolved

                                          they're nullptr by default.

                                          Youseff Bourouphel

                                          Acknowledged

                                          Line 1030, Patchset 107: back_button_height) +
                                          Qingxin Wu . resolved

                                          just inline `GetBackForwardButtonSize().height()`?

                                          Youseff Bourouphel

                                          Done

                                          Line 1033, Patchset 107 (Parent): back_->GetMinimumSize().height()) +
                                          Qingxin Wu . resolved

                                          this is MinimumSize, not PreferredSize which GetBackForwardButtonSize returns

                                          Youseff Bourouphel

                                          Made GetBackForwardButtonSize have a parameter for min size.

                                          File components/browser_apis/browser_controls/browser_controls_api.mojom
                                          Line 75, Patchset 107: GetBackForwardState() => (ButtonState back_state, ButtonState forward_state);
                                          Qingxin Wu . resolved

                                          Paul made a major redesign for this inital state solution in https://chromium-review.googlesource.com/c/chromium/src/+/7552473. There are no Getxxx mojo APIs anymore. Sorry to say that, but this should also be updated to follow the new design. We can probably add a todo and change this in a separate CL if this method is not broken by that and if you're really tired of making changes in this CL :)

                                          Youseff Bourouphel

                                          Done

                                          Open in Gerrit

                                          Related details

                                          Attention is currently required from:
                                          • Qingxin Wu
                                          Submit Requirements:
                                            • requirement satisfiedCode-Coverage
                                            • requirement is not 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: I3468fbbcd74875ce08c41dd1af1a984b0570a4e9
                                            Gerrit-Change-Number: 7466673
                                            Gerrit-PatchSet: 115
                                            Gerrit-Owner: Youseff Bourouphel <ybouro...@google.com>
                                            Gerrit-Reviewer: Youseff Bourouphel <ybouro...@google.com>
                                            Gerrit-CC: Paul Jensen <paulj...@chromium.org>
                                            Gerrit-CC: Qingxin Wu <qing...@google.com>
                                            Gerrit-Attention: Qingxin Wu <qing...@google.com>
                                            Gerrit-Comment-Date: Fri, 20 Feb 2026 22:58:41 +0000
                                            Gerrit-HasComments: Yes
                                            Gerrit-Has-Labels: No
                                            Comment-In-Reply-To: Qingxin Wu <qing...@google.com>
                                            satisfied_requirement
                                            unsatisfied_requirement
                                            open
                                            diffy
                                            Reply all
                                            Reply to author
                                            Forward
                                            0 new messages