[BrowserControls] Allow adjustment tab strip height during startup [chromium/src : main]

0 views
Skip to first unread message

Wenyu Fu (Gerrit)

unread,
Jan 12, 2026, 6:09:18 PMJan 12
to Sirisha Kavuluru, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Aishwarya Rajesh, Mark Schillaci and Sirisha Kavuluru

Wenyu Fu voted and added 1 comment

Votes added by Wenyu Fu

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 5:
Wenyu Fu . resolved

PTAL

I gate this fix using the LockTopControlsV2 flag; it's technically more appropriate to use the TopControlsRefactorV2, but the risk is that feature is bundled with bookmark bar, and we'll have to make edits to the bookmark bar experiment config if this becomes broken.

Let me know your thoughts.

cc @mschi...@google.com

Open in Gerrit

Related details

Attention is currently required from:
  • Aishwarya Rajesh
  • Mark Schillaci
  • Sirisha Kavuluru
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3d622413fc60799043a772fd9eceaec8d3448cb3
Gerrit-Change-Number: 7428008
Gerrit-PatchSet: 5
Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
Gerrit-CC: Mark Schillaci <mschi...@google.com>
Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
Gerrit-Attention: Aishwarya Rajesh <aishw...@google.com>
Gerrit-Attention: Mark Schillaci <mschi...@google.com>
Gerrit-Comment-Date: Mon, 12 Jan 2026 23:09:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Aishwarya Rajesh (Gerrit)

unread,
Jan 13, 2026, 8:38:07 AMJan 13
to Wenyu Fu, Sirisha Kavuluru, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Mark Schillaci, Sirisha Kavuluru and Wenyu Fu

Aishwarya Rajesh added 6 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Aishwarya Rajesh . resolved

LGTM % nits

File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
Line 2456, Patchset 6 (Latest): // from TabStripTransitionCoordinator. When canForceTopChromeHeightAdjustmentOnStartup,
// TabStripTopControlLayer is already adjusted to the TSTC height at an earlier timing,
Aishwarya Rajesh . unresolved
```suggestion
// from TabStripTransitionCoordinator. When canForceTopChromeHeightAdjustmentOnStartup() returns true,
// TabStripTopControlLayer is already adjusted to this internal value at an earlier timing,
```
File chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java
Line 47, Patchset 6 (Latest): /**
Aishwarya Rajesh . unresolved

It is technically possible for this method to be called in a non-startup flow, or without a null check on the tab strip delegate, correct? The `*OnStartup` naming is good indication this is expected to be called during startup but maybe we should explicitly call this out in the method docs so callers are aware that this may not WAI if called from a non-startup context.

Although it seems like we will eventually get rid of this method post-launch and we have asserts in place to gauge if this method is called in a non-startup flow so maybe this is okay.

File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinatorUnitTest.java
Line 1020, Patchset 6 (Latest): // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request
// went/
// through without waiting for resource adapter.
Aishwarya Rajesh . unresolved

format; suggestion: verify that the coordinator request goes through without waiting for the resource adapter.

Line 1045, Patchset 6 (Latest): // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request
Aishwarya Rajesh . unresolved

s/verify that the coordinator request does not go through.

Line 1065, Patchset 6 (Latest): // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request
setUpTabStripTransitionCoordinator(
false, LARGE_NORMAL_WINDOW_WIDTH, /* initDelegate= */ false);
Assert.assertEquals(
"Height request should not go through when feature disabled.",
NOTHING_OBSERVED,
mTestHandler.heightRequested);
Aishwarya Rajesh . unresolved
```suggestion
// Set up the coordinator. Launching Chrome in non-DW mode, verify that the coordinator request does not go through.
setUpTabStripTransitionCoordinator(
false, LARGE_NORMAL_WINDOW_WIDTH, /* initDelegate= */ false);
Assert.assertEquals(
"Height request should not go through when not in desktop windowing mode.",
NOTHING_OBSERVED,
mTestHandler.heightRequested);
```
Open in Gerrit

Related details

Attention is currently required from:
  • Mark Schillaci
  • Sirisha Kavuluru
  • Wenyu Fu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3d622413fc60799043a772fd9eceaec8d3448cb3
    Gerrit-Change-Number: 7428008
    Gerrit-PatchSet: 6
    Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
    Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
    Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
    Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
    Gerrit-CC: Mark Schillaci <mschi...@google.com>
    Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
    Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
    Gerrit-Attention: Mark Schillaci <mschi...@google.com>
    Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
    Gerrit-Comment-Date: Tue, 13 Jan 2026 13:37:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aishwarya Rajesh (Gerrit)

    unread,
    Jan 13, 2026, 8:38:13 AMJan 13
    to Wenyu Fu, Sirisha Kavuluru, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
    Attention needed from Mark Schillaci, Sirisha Kavuluru and Wenyu Fu

    Aishwarya Rajesh voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mark Schillaci
    • Sirisha Kavuluru
    • Wenyu Fu
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
      Gerrit-Change-Number: 7428008
      Gerrit-PatchSet: 6
      Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
      Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
      Gerrit-CC: Mark Schillaci <mschi...@google.com>
      Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Mark Schillaci <mschi...@google.com>
      Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 13:37:46 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mark Schillaci (Gerrit)

      unread,
      Jan 13, 2026, 10:48:09 AMJan 13
      to Wenyu Fu, Aishwarya Rajesh, Sirisha Kavuluru, Theresa Sullivan, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Sirisha Kavuluru and Wenyu Fu

      Mark Schillaci added 1 comment

      File chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
      Line 1367, Patchset 6 (Latest): LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2, "adjust_tab_strip_on_startup", true);
      Mark Schillaci . unresolved

      drive-by: would it help at all to include multiple variations in chrome://flags so QA can try testing with this param both false and true?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sirisha Kavuluru
      • Wenyu Fu
      Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 15:47:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sirisha Kavuluru (Gerrit)

      unread,
      Jan 13, 2026, 1:27:09 PMJan 13
      to Wenyu Fu, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Wenyu Fu

      Sirisha Kavuluru added 4 comments

      File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
      Line 1195, Patchset 6: topControlsStacker,
      homeButtonDisplay,
      mTabStripTopControlLayer);
      Sirisha Kavuluru . unresolved

      nit: Move mTabStripTopControlLayer closer to related topControlsStacker

      Line 2459, Patchset 6: if (!BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      Sirisha Kavuluru . unresolved

      Maybe tied to the other comment - post launch, if we pre-initialize TabStripTransitionCoordinator for all tablets, this will not be required here since TabStripTopControlLayer would be adjusted elsewhere. Is that right?

      Wondering if instead of canForceTopChromeHeightAdjustmentOnStartup check, this should check whether TabStripTransitionCoordinator was pre-initialized vs not

      File chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayer.java
      Line 341, Patchset 6: private boolean canTransitionWithoutTabStrip() {
      Sirisha Kavuluru . unresolved

      I have minimal context on this class - what does transition without tab strip mean for this layer?

      Is the transition here referring to TabStrip height transition? We want to kick this off even if tab strip is not drawn?

      File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java
      Line 303, Patchset 6: // When we can force height adjustment on start up, we need to create tab strip transition
      // earlier, before native is ready.
      if (BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      Sirisha Kavuluru . unresolved

      Right now canForceTopChromeHeightAdjustmentOnStartup checks for large tablet along with flag checks. Post launch, would it be safe to initialize mTabStripTransitionCoordinator early on any tablet to avoid forking logic?

      If so, can we add a TODO to capture this

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Wenyu Fu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
      Gerrit-Change-Number: 7428008
      Gerrit-PatchSet: 6
      Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
      Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
      Gerrit-CC: Mark Schillaci <mschi...@google.com>
      Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
      Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 18:26:56 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Wenyu Fu (Gerrit)

      unread,
      Jan 13, 2026, 2:25:58 PMJan 13
      to Aishwarya Rajesh, Sirisha Kavuluru, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Mark Schillaci and Sirisha Kavuluru

      Wenyu Fu added 9 comments

      File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
      Line 2456, Patchset 6: // from TabStripTransitionCoordinator. When canForceTopChromeHeightAdjustmentOnStartup,

      // TabStripTopControlLayer is already adjusted to the TSTC height at an earlier timing,
      Aishwarya Rajesh . resolved
      ```suggestion
      // from TabStripTransitionCoordinator. When canForceTopChromeHeightAdjustmentOnStartup() returns true,
      // TabStripTopControlLayer is already adjusted to this internal value at an earlier timing,
      ```
      Wenyu Fu

      Done

      Line 2459, Patchset 6: if (!BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      Sirisha Kavuluru . unresolved

      Maybe tied to the other comment - post launch, if we pre-initialize TabStripTransitionCoordinator for all tablets, this will not be required here since TabStripTopControlLayer would be adjusted elsewhere. Is that right?

      Wondering if instead of canForceTopChromeHeightAdjustmentOnStartup check, this should check whether TabStripTransitionCoordinator was pre-initialized vs not

      Wenyu Fu

      My intention to keep this "flag" here is to ensure 1) in short term, it's clear the behavior difference based on the flag settings and 2) post launch, this call can be cleaned up.

      Checking whether TSTC was pre-initialized might make the code feel clunky, as we need to keep a reference to it like

      ```
      boolean mIsTstcInitialized;

      ToolbarManager() {
      // ctor...
         mIsTstcInitialized = mToolbar.getTstc() != null;
      }
      public initializeWithNative() {
      // ...
      if (mIsTstcInitialized) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      // ...
      }
      ```

      If you don't feel strongly about checking whether TSTC is initialized, my preference is keep the current style. Let me know :)

      File chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java
      Line 47, Patchset 6: /**
      Aishwarya Rajesh . resolved

      It is technically possible for this method to be called in a non-startup flow, or without a null check on the tab strip delegate, correct? The `*OnStartup` naming is good indication this is expected to be called during startup but maybe we should explicitly call this out in the method docs so callers are aware that this may not WAI if called from a non-startup context.

      Although it seems like we will eventually get rid of this method post-launch and we have asserts in place to gauge if this method is called in a non-startup flow so maybe this is okay.

      Wenyu Fu

      Thanks for the thoughtful comment. I made this method as a helper to check feature flags, so it's not meant to be only called during the start up flow.

      Renamed this to `is*Enabled` to make that obvious.

      File chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
      Line 1367, Patchset 6: LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2, "adjust_tab_strip_on_startup", true);
      Mark Schillaci . resolved

      drive-by: would it help at all to include multiple variations in chrome://flags so QA can try testing with this param both false and true?

      Wenyu Fu

      Thanks for the suggestion. Since it's a bug fix, it doesn't make sense to turn this off other than using it as a killswitch, so I did not include this.

      File chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayer.java
      Line 341, Patchset 6: private boolean canTransitionWithoutTabStrip() {
      Sirisha Kavuluru . unresolved

      I have minimal context on this class - what does transition without tab strip mean for this layer?

      Is the transition here referring to TabStrip height transition? We want to kick this off even if tab strip is not drawn?

      Wenyu Fu

      what does transition without tab strip mean for this layer

      The "TabStrip" here refers to `mTabStrip`, which is the TabStripSceneLayerHolder implemented by StripLayoutHelperManager. The goal of this change is to start transition during Chrome startup, so it'll happen before native is ready, when StripLayoutHelperManager is initialized

      Is the transition here referring to TabStrip height transition?

      Yes - The "Transition" here refers to the tab strip transition, which is also how we adjust the app header height during Chrome startup.

      We want to kick this off even if the tab strip is not drawn?

      This is the key of this CL - tab strip transition involved adjustment not only for the StripLayoutHelperManager, it also needs adjustment for the ControlContainer to position the toolbar and update the tab strip placeholder drawable.

      File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java
      Line 303, Patchset 6: // When we can force height adjustment on start up, we need to create tab strip transition
      // earlier, before native is ready.
      if (BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      Sirisha Kavuluru . resolved

      Right now canForceTopChromeHeightAdjustmentOnStartup checks for large tablet along with flag checks. Post launch, would it be safe to initialize mTabStripTransitionCoordinator early on any tablet to avoid forking logic?

      If so, can we add a TODO to capture this

      Wenyu Fu

      Good point, done.

      File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinatorUnitTest.java
      Line 1020, Patchset 6: // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request

      // went/
      // through without waiting for resource adapter.
      Aishwarya Rajesh . resolved

      format; suggestion: verify that the coordinator request goes through without waiting for the resource adapter.

      Wenyu Fu

      Done

      Line 1045, Patchset 6: // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request
      Aishwarya Rajesh . resolved

      s/verify that the coordinator request does not go through.

      Wenyu Fu

      Done

      Line 1065, Patchset 6: // Set up the coordinator. Launching Chrome in DW mode, and test the coordinator request

      setUpTabStripTransitionCoordinator(
      false, LARGE_NORMAL_WINDOW_WIDTH, /* initDelegate= */ false);
      Assert.assertEquals(
      "Height request should not go through when feature disabled.",
      NOTHING_OBSERVED,
      mTestHandler.heightRequested);
      Aishwarya Rajesh . resolved
      ```suggestion
      // Set up the coordinator. Launching Chrome in non-DW mode, verify that the coordinator request does not go through.
      setUpTabStripTransitionCoordinator(
      false, LARGE_NORMAL_WINDOW_WIDTH, /* initDelegate= */ false);
      Assert.assertEquals(
      "Height request should not go through when not in desktop windowing mode.",
      NOTHING_OBSERVED,
      mTestHandler.heightRequested);
      ```
      Wenyu Fu

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mark Schillaci
      • Sirisha Kavuluru
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
      Gerrit-Change-Number: 7428008
      Gerrit-PatchSet: 8
      Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
      Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
      Gerrit-CC: Mark Schillaci <mschi...@google.com>
      Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Mark Schillaci <mschi...@google.com>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 19:25:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Aishwarya Rajesh <aishw...@google.com>
      Comment-In-Reply-To: Sirisha Kavuluru <skav...@google.com>
      Comment-In-Reply-To: Mark Schillaci <mschi...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Wenyu Fu (Gerrit)

      unread,
      Jan 13, 2026, 2:31:07 PMJan 13
      to Aishwarya Rajesh, Sirisha Kavuluru, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Mark Schillaci and Sirisha Kavuluru

      Wenyu Fu voted and added 1 comment

      Votes added by Wenyu Fu

      Commit-Queue+1

      1 comment

      File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
      Line 1195, Patchset 6: topControlsStacker,
      homeButtonDisplay,
      mTabStripTopControlLayer);
      Sirisha Kavuluru . resolved

      nit: Move mTabStripTopControlLayer closer to related topControlsStacker

      Wenyu Fu

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mark Schillaci
      • Sirisha Kavuluru
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
      Gerrit-Change-Number: 7428008
      Gerrit-PatchSet: 9
      Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
      Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
      Gerrit-CC: Mark Schillaci <mschi...@google.com>
      Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Mark Schillaci <mschi...@google.com>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 19:30:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Sirisha Kavuluru <skav...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sirisha Kavuluru (Gerrit)

      unread,
      Jan 13, 2026, 2:42:36 PMJan 13
      to Wenyu Fu, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Mark Schillaci and Wenyu Fu

      Sirisha Kavuluru voted and added 2 comments

      Votes added by Sirisha Kavuluru

      Code-Review+1

      2 comments

      File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
      Line 2459, Patchset 6: if (!BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      Sirisha Kavuluru . unresolved

      Maybe tied to the other comment - post launch, if we pre-initialize TabStripTransitionCoordinator for all tablets, this will not be required here since TabStripTopControlLayer would be adjusted elsewhere. Is that right?

      Wondering if instead of canForceTopChromeHeightAdjustmentOnStartup check, this should check whether TabStripTransitionCoordinator was pre-initialized vs not

      Wenyu Fu

      My intention to keep this "flag" here is to ensure 1) in short term, it's clear the behavior difference based on the flag settings and 2) post launch, this call can be cleaned up.

      Checking whether TSTC was pre-initialized might make the code feel clunky, as we need to keep a reference to it like

      ```
      boolean mIsTstcInitialized;

      ToolbarManager() {
      // ctor...
         mIsTstcInitialized = mToolbar.getTstc() != null;
      }
      public initializeWithNative() {
      // ...
      if (mIsTstcInitialized) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      // ...
      }
      ```

      If you don't feel strongly about checking whether TSTC is initialized, my preference is keep the current style. Let me know :)

      Sirisha Kavuluru

      If this can be cleanup post launch, can we add a TODO here, something like

      " TODO: Once canForceTopChromeHeightAdjustmentOnStartup flags are launched, this setter can be removed for all form factors since TSTC will be early initialized for all tablets and this setter will be called elsewhere"

      Without the TODO, this reads as we will need to keep this logic for non-large tablets.

      File chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayer.java
      Line 341, Patchset 6: private boolean canTransitionWithoutTabStrip() {
      Sirisha Kavuluru . resolved

      I have minimal context on this class - what does transition without tab strip mean for this layer?

      Is the transition here referring to TabStrip height transition? We want to kick this off even if tab strip is not drawn?

      Wenyu Fu

      what does transition without tab strip mean for this layer

      The "TabStrip" here refers to `mTabStrip`, which is the TabStripSceneLayerHolder implemented by StripLayoutHelperManager. The goal of this change is to start transition during Chrome startup, so it'll happen before native is ready, when StripLayoutHelperManager is initialized

      Is the transition here referring to TabStrip height transition?

      Yes - The "Transition" here refers to the tab strip transition, which is also how we adjust the app header height during Chrome startup.

      We want to kick this off even if the tab strip is not drawn?

      This is the key of this CL - tab strip transition involved adjustment not only for the StripLayoutHelperManager, it also needs adjustment for the ControlContainer to position the toolbar and update the tab strip placeholder drawable.

      Sirisha Kavuluru

      Acknowledged

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mark Schillaci
      • Wenyu Fu
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
      Gerrit-Change-Number: 7428008
      Gerrit-PatchSet: 10
      Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
      Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
      Gerrit-CC: Mark Schillaci <mschi...@google.com>
      Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
      Gerrit-Attention: Mark Schillaci <mschi...@google.com>
      Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 19:42:25 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Sirisha Kavuluru <skav...@google.com>
      Comment-In-Reply-To: Wenyu Fu <wen...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Wenyu Fu (Gerrit)

      unread,
      Jan 13, 2026, 4:36:36 PMJan 13
      to Sirisha Kavuluru, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Mark Schillaci

      Wenyu Fu added 1 comment

      File chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
      Line 2459, Patchset 6: if (!BrowserControlsUtils.canForceTopChromeHeightAdjustmentOnStartup()) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      Sirisha Kavuluru . resolved

      Maybe tied to the other comment - post launch, if we pre-initialize TabStripTransitionCoordinator for all tablets, this will not be required here since TabStripTopControlLayer would be adjusted elsewhere. Is that right?

      Wondering if instead of canForceTopChromeHeightAdjustmentOnStartup check, this should check whether TabStripTransitionCoordinator was pre-initialized vs not

      Wenyu Fu

      My intention to keep this "flag" here is to ensure 1) in short term, it's clear the behavior difference based on the flag settings and 2) post launch, this call can be cleaned up.

      Checking whether TSTC was pre-initialized might make the code feel clunky, as we need to keep a reference to it like

      ```
      boolean mIsTstcInitialized;

      ToolbarManager() {
      // ctor...
         mIsTstcInitialized = mToolbar.getTstc() != null;
      }
      public initializeWithNative() {
      // ...
      if (mIsTstcInitialized) {
      mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
      }
      // ...
      }
      ```

      If you don't feel strongly about checking whether TSTC is initialized, my preference is keep the current style. Let me know :)

      Sirisha Kavuluru

      If this can be cleanup post launch, can we add a TODO here, something like

      " TODO: Once canForceTopChromeHeightAdjustmentOnStartup flags are launched, this setter can be removed for all form factors since TSTC will be early initialized for all tablets and this setter will be called elsewhere"

      Without the TODO, this reads as we will need to keep this logic for non-large tablets.

      Wenyu Fu

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mark Schillaci
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement 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: I3d622413fc60799043a772fd9eceaec8d3448cb3
        Gerrit-Change-Number: 7428008
        Gerrit-PatchSet: 12
        Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
        Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
        Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
        Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
        Gerrit-CC: Mark Schillaci <mschi...@google.com>
        Gerrit-CC: Theresa Sullivan <twell...@chromium.org>
        Gerrit-Attention: Mark Schillaci <mschi...@google.com>
        Gerrit-Comment-Date: Tue, 13 Jan 2026 21:36:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy

        Wenyu Fu (Gerrit)

        unread,
        Jan 13, 2026, 6:01:51 PMJan 13
        to Sirisha Kavuluru, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
        Attention needed from Mark Schillaci

        Wenyu Fu voted Commit-Queue+2

        Commit-Queue+2
        Gerrit-Comment-Date: Tue, 13 Jan 2026 23:00:21 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jan 13, 2026, 6:08:08 PMJan 13
        to Wenyu Fu, Sirisha Kavuluru, Aishwarya Rajesh, Theresa Sullivan, Mark Schillaci, AyeAye, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com

        Chromium LUCI CQ submitted the change with unreviewed changes

        Unreviewed changes

        10 is the latest approved patch-set.
        The change was submitted with unreviewed changes in the following files:

        ```
        The name of the file: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
        Insertions: 2, Deletions: 1.

        @@ -2456,7 +2456,8 @@

        // from TabStripTransitionCoordinator. When canForceTopChromeHeightAdjustmentOnStartup()
                 // returns true, TabStripTopControlLayer is already adjusted to this internal height at an
        // earlier timing, so this call can be skipped.
        - if (!BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled()) {
        + // TODO(crbug.com/450970998): This call can be remove once feature launch.
        + if (!BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled(mActivity)) {
        mTabStripTopControlLayer.set(mToolbar.getTabStripHeight());
        }

        ```
        ```
        The name of the file: chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinatorUnitTest.java
        Insertions: 1, Deletions: 0.

        @@ -1013,6 +1013,7 @@
        ChromeFeatureList.LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2
        + ":adjust_tab_strip_on_startup/true"
        })
        + @Config(qualifiers = "sw720dp")
        public void adjustOnStartup_OnDesktopWindowUpdate_Wide() {
        // Deliberately having the resource adapter no-op to test startup flow.
        doNothing().when(mViewResourceAdapter).triggerBitmapCapture();
        ```
        ```
        The name of the file: chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayer.java
        Insertions: 2, Deletions: 1.

        @@ -339,6 +339,7 @@
        }

        private boolean canTransitionWithoutTabStrip() {
        - return BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled();
        + return BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled(
        + mControlContainer.getView().getContext());
        }
        }
        ```
        ```
        The name of the file: chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/HeightTransitionHandler.java
        Insertions: 2, Deletions: 1.

        @@ -542,7 +542,8 @@

        /** Whether we can perform a tab strip transition right away, skip waiting on the delegate. */
        private boolean canForceTransitionDuringStartup() {
        - if (!BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled()) {
        + if (!BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled(
        + mControlContainer.getView().getContext())) {
        return false;
        }

        ```
        ```
        The name of the file: chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayerUnitTest.java
        Insertions: 7, Deletions: 6.

        @@ -12,6 +12,8 @@
        import static org.mockito.Mockito.times;
        import static org.mockito.Mockito.verify;

        +import android.view.View;
        +
        import org.junit.Before;
        import org.junit.Test;
        import org.junit.runner.RunWith;
        @@ -20,11 +22,10 @@

        import org.chromium.base.test.BaseRobolectricTestRunner;
        import org.chromium.base.test.util.CallbackHelper;
        -import org.chromium.base.test.util.Features.EnableFeatures;
        import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
        +import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils;
        import org.chromium.chrome.browser.browser_controls.TopControlsStacker;
        import org.chromium.chrome.browser.browser_controls.TopControlsStacker.TopControlType;
        -import org.chromium.chrome.browser.flags.ChromeFeatureList;
        import org.chromium.chrome.browser.toolbar.ControlContainer;

        /** Unit tests for {@link TabStripTopControlLayer}. */
        @@ -35,6 +36,7 @@
        @Mock private ControlContainer mControlContainer;
        @Mock private TabStripSceneLayerHolder mTabStripSceneLayerHolder;
        @Mock private BrowserControlsStateProvider mBrowserControls;
        + @Mock private View mControlContainerView;

        private TabStripTopControlLayer mTabStripTopControlLayer;
        private final CallbackHelper mOnTransitionStartedCallback = new CallbackHelper();
        @@ -43,6 +45,7 @@
        public void setUp() {
        MockitoAnnotations.openMocks(this);
        doReturn(true).when(mTopControlsStacker).isLayerAtTop(TopControlType.TABSTRIP);
        + doReturn(mControlContainerView).when(mControlContainer).getView();
        mTabStripTopControlLayer =
        new TabStripTopControlLayer(
        0, mTopControlsStacker, mBrowserControls, mControlContainer);
        @@ -147,11 +150,9 @@
        }

        @Test
        - @EnableFeatures({
        - ChromeFeatureList.LOCK_TOP_CONTROLS_ON_LARGE_TABLETS_V2
        - + ":adjust_tab_strip_up_startup/true"
        - })
        public void testTransitionWithoutTabStrip() {
        + BrowserControlsUtils.setsSyncMinHeightWithTotalHeightForTesting(true);
        +
        // Recreate the layer without setting the tab strip (without calling initializeWithNative).
        mTabStripTopControlLayer =
        new TabStripTopControlLayer(
        ```
        ```
        The name of the file: chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java
        Insertions: 2, Deletions: 1.

        @@ -304,7 +304,8 @@

        // earlier, before native is ready.
                 // TODO(crbug.com/450970998): Once launched, it's safe to always call
        // maybeInitializeTabStripTransitionCoordinator on all form factors.
        - if (BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled()) {
        + if (BrowserControlsUtils.isForceTopChromeHeightAdjustmentOnStartupEnabled(
        + toolbarLayout.getContext())) {
        mTabStripTransitionCoordinator =
        maybeInitializeTabStripTransitionCoordinator(
        mToolbarLayout,
        ```
        ```
        The name of the file: chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java
        Insertions: 2, Deletions: 2.

        @@ -46,13 +46,13 @@
        }

        /** Whether force adjusting top chrome height is allowed based on feature flags. */
        - public static boolean isForceTopChromeHeightAdjustmentOnStartupEnabled() {
        + public static boolean isForceTopChromeHeightAdjustmentOnStartupEnabled(Context context) {
        // Note: the check for feature doSyncMinHeightWithTotalHeightV2 is not necessary once the
        // feature flag is launched. Once we are ready to cleanup the param
        // sLockTopControlsForceAdjustHeightOnStartup it's safe to assume this method to return
        // true always.
        return isTopControlsRefactorOffsetEnabled()
        - && doSyncMinHeightWithTotalHeightV2()
        + && doSyncMinHeightWithTotalHeightV2(context)
        && ChromeFeatureList.sLockTopControlsForceAdjustHeightOnStartup.getValue();
        }

        ```

        Change information

        Commit message:
        [BrowserControls] Allow adjustment tab strip height during startup

        Part 2 of the complete POC: crrev.com/c/7427223

        Create TabStripTransitionCoordinator early, before native is ready, so
        we can just the toolbar's position and tab strip height immediately when
        the app header insets are updated. This change reduced the frame jumps
        when Chrome is launched in the desktop windowing mode.
        Bug: 449166259
        Change-Id: I3d622413fc60799043a772fd9eceaec8d3448cb3
        Commit-Queue: Wenyu Fu <wen...@chromium.org>
        Reviewed-by: Sirisha Kavuluru <skav...@google.com>
        Reviewed-by: Aishwarya Rajesh <aishw...@google.com>
        Cr-Commit-Position: refs/heads/main@{#1568757}
        Files:
        • M chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
        • M chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java
        • M chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
        • M chrome/browser/ui/android/tabstrip/BUILD.gn
        • M chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayer.java
        • M chrome/browser/ui/android/tabstrip/java/src/org/chromium/chrome/browser/tabstrip/TabStripTopControlLayerUnitTest.java
        • M chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java
        • M chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/HeightTransitionHandler.java
        • M chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/tab_strip/TabStripTransitionCoordinatorUnitTest.java
        Change size: L
        Delta: 9 files changed, 238 insertions(+), 20 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Sirisha Kavuluru, +1 by Aishwarya Rajesh
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I3d622413fc60799043a772fd9eceaec8d3448cb3
        Gerrit-Change-Number: 7428008
        Gerrit-PatchSet: 13
        Gerrit-Owner: Wenyu Fu <wen...@chromium.org>
        Gerrit-Reviewer: Aishwarya Rajesh <aishw...@google.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
        Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages