[TabStrip] Cleanup compositor button tinting logic [chromium/src : main]

0 views
Skip to first unread message

Neil Coronado (Gerrit)

unread,
Jun 24, 2026, 9:33:12 PM (3 days ago) Jun 24
to Michael Wu, chromium...@chromium.org
Attention needed from Michael Wu

Neil Coronado voted and added 1 comment

Votes added by Neil Coronado

Commit-Queue+1

1 comment

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
Line 824, Patchset 2 (Latest): @ColorRes int iconTintRes = R.color.default_icon_color_tint_list;
Neil Coronado . unresolved

I was hoping to make these all resIds, so we only had to actually pull the color once at the end, but I forgot that some things pull from attrs, so we need to use the util methods (e.g. `SemanticColorUtils.getColorSurfaceContainerLow`), which return a colorInt.

I can make them all @ColorInts for consistency if that's preferred, but I think the repeated `#getColor` calls hurt visibility. Or I suppose I could also wrap these in color state lists, but feels like a bit much. I don't feel too strongly.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Wu
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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
Gerrit-Change-Number: 7960504
Gerrit-PatchSet: 2
Gerrit-Owner: Neil Coronado <ne...@google.com>
Gerrit-Reviewer: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Neil Coronado <ne...@google.com>
Gerrit-Attention: Michael Wu <mk...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 01:33:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Wu (Gerrit)

unread,
Jun 25, 2026, 2:19:15 PM (3 days ago) Jun 25
to Neil Coronado, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Neil Coronado

Michael Wu added 4 comments

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
Line 824, Patchset 2 (Latest): @ColorRes int iconTintRes = R.color.default_icon_color_tint_list;
Neil Coronado . resolved

I was hoping to make these all resIds, so we only had to actually pull the color once at the end, but I forgot that some things pull from attrs, so we need to use the util methods (e.g. `SemanticColorUtils.getColorSurfaceContainerLow`), which return a colorInt.

I can make them all @ColorInts for consistency if that's preferred, but I think the repeated `#getColor` calls hurt visibility. Or I suppose I could also wrap these in color state lists, but feels like a bit much. I don't feel too strongly.

Michael Wu

Acknowledged

Line 855, Patchset 2 (Parent): int iconTint = incognito ? R.color.modern_white : R.color.default_icon_color_tint_list;
Michael Wu . unresolved

Since we are doing `else if (incognito) {`, would this run into issues if we are in night mode (would skip the incognito block which sets `iconTintRes = R.color.modern_white`?

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTab.java
Line 308, Patchset 2 (Parent): int iconColor =
incognito ? R.color.default_icon_color_light : R.color.default_icon_color_tint_list;
int iconColorInt = context.getColorStateList(iconColor).getDefaultColor();
Michael Wu . unresolved

I think the new logic accidentally reverses this

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTrailingButtonsCoordinator.java
Line 416, Patchset 2 (Latest): @ColorInt int bgDefaultColor = SemanticColorUtils.getColorSurfaceContainerLow(mContext);
Michael Wu . unresolved

nit: Should we rename this and below bgTint, bgHoverTint, bgPressedTint to be consistent with the naming in the other files

Open in Gerrit

Related details

Attention is currently required from:
  • Neil Coronado
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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
Gerrit-Change-Number: 7960504
Gerrit-PatchSet: 2
Gerrit-Owner: Neil Coronado <ne...@google.com>
Gerrit-Reviewer: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Neil Coronado <ne...@google.com>
Gerrit-Attention: Neil Coronado <ne...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 18:19:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Neil Coronado <ne...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Neil Coronado (Gerrit)

unread,
Jun 25, 2026, 2:51:03 PM (3 days ago) Jun 25
to Chromium LUCI CQ, Michael Wu, chromium...@chromium.org
Attention needed from Michael Wu

Neil Coronado added 3 comments

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
Line 855, Patchset 2 (Parent): int iconTint = incognito ? R.color.modern_white : R.color.default_icon_color_tint_list;
Michael Wu . unresolved

Since we are doing `else if (incognito) {`, would this run into issues if we are in night mode (would skip the incognito block which sets `iconTintRes = R.color.modern_white`?

Neil Coronado

ah, wait I'm pretty sure the old (and new) logic is bugged, and we should prioritize Incognito > light/dark, so changed to check Incognito first (and instead skip the dark mode block).

if this are no concerns, I'll note this in the CL description as well.

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTab.java
Line 308, Patchset 2 (Parent): int iconColor =
incognito ? R.color.default_icon_color_light : R.color.default_icon_color_tint_list;
int iconColorInt = context.getColorStateList(iconColor).getDefaultColor();
Michael Wu . resolved

I think the new logic accidentally reverses this

Neil Coronado

oops, fixed

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTrailingButtonsCoordinator.java
Line 416, Patchset 2 (Latest): @ColorInt int bgDefaultColor = SemanticColorUtils.getColorSurfaceContainerLow(mContext);
Michael Wu . resolved

nit: Should we rename this and below bgTint, bgHoverTint, bgPressedTint to be consistent with the naming in the other files

Neil Coronado

oops, done

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Wu
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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
Gerrit-Change-Number: 7960504
Gerrit-PatchSet: 2
Gerrit-Owner: Neil Coronado <ne...@google.com>
Gerrit-Reviewer: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Neil Coronado <ne...@google.com>
Gerrit-Attention: Michael Wu <mk...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 18:50:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Wu <mk...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Wu (Gerrit)

unread,
Jun 25, 2026, 3:31:06 PM (3 days ago) Jun 25
to Neil Coronado, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Neil Coronado

Michael Wu added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
Line 855, Patchset 2 (Parent): int iconTint = incognito ? R.color.modern_white : R.color.default_icon_color_tint_list;
Michael Wu . unresolved

Since we are doing `else if (incognito) {`, would this run into issues if we are in night mode (would skip the incognito block which sets `iconTintRes = R.color.modern_white`?

Neil Coronado

ah, wait I'm pretty sure the old (and new) logic is bugged, and we should prioritize Incognito > light/dark, so changed to check Incognito first (and instead skip the dark mode block).

if this are no concerns, I'll note this in the CL description as well.

Michael Wu

That change SGTM! (I think it's not uploaded yet though)

Open in Gerrit

Related details

Attention is currently required from:
  • Neil Coronado
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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
Gerrit-Change-Number: 7960504
Gerrit-PatchSet: 2
Gerrit-Owner: Neil Coronado <ne...@google.com>
Gerrit-Reviewer: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Neil Coronado <ne...@google.com>
Gerrit-Attention: Neil Coronado <ne...@google.com>
Gerrit-Comment-Date: Thu, 25 Jun 2026 19:30:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Wu <mk...@google.com>
Comment-In-Reply-To: Neil Coronado <ne...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Neil Coronado (Gerrit)

unread,
Jun 25, 2026, 3:39:46 PM (3 days ago) Jun 25
to Chromium LUCI CQ, Michael Wu, chromium...@chromium.org
Attention needed from Michael Wu

Neil Coronado added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
Line 855, Patchset 2 (Parent): int iconTint = incognito ? R.color.modern_white : R.color.default_icon_color_tint_list;
Michael Wu . resolved

Since we are doing `else if (incognito) {`, would this run into issues if we are in night mode (would skip the incognito block which sets `iconTintRes = R.color.modern_white`?

Neil Coronado

ah, wait I'm pretty sure the old (and new) logic is bugged, and we should prioritize Incognito > light/dark, so changed to check Incognito first (and instead skip the dark mode block).

if this are no concerns, I'll note this in the CL description as well.

Michael Wu

That change SGTM! (I think it's not uploaded yet though)

Neil Coronado

oops, updated.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Wu
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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
    Gerrit-Change-Number: 7960504
    Gerrit-PatchSet: 4
    Gerrit-Owner: Neil Coronado <ne...@google.com>
    Gerrit-Reviewer: Michael Wu <mk...@google.com>
    Gerrit-Reviewer: Neil Coronado <ne...@google.com>
    Gerrit-Attention: Michael Wu <mk...@google.com>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 19:39:34 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Wu (Gerrit)

    unread,
    Jun 25, 2026, 5:38:41 PM (2 days ago) Jun 25
    to Neil Coronado, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Neil Coronado

    Michael Wu voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neil Coronado
    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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
      Gerrit-Change-Number: 7960504
      Gerrit-PatchSet: 4
      Gerrit-Owner: Neil Coronado <ne...@google.com>
      Gerrit-Reviewer: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      Gerrit-Attention: Neil Coronado <ne...@google.com>
      Gerrit-Comment-Date: Thu, 25 Jun 2026 21:38:26 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Neil Coronado (Gerrit)

      unread,
      Jun 26, 2026, 3:35:54 PM (2 days ago) Jun 26
      to Michael Wu, Chromium LUCI CQ, chromium...@chromium.org

      Neil Coronado voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
      Gerrit-Change-Number: 7960504
      Gerrit-PatchSet: 4
      Gerrit-Owner: Neil Coronado <ne...@google.com>
      Gerrit-Reviewer: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 19:35:41 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jun 26, 2026, 4:30:12 PM (2 days ago) Jun 26
      to Neil Coronado, Michael Wu, chromium...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [TabStrip] Cleanup compositor button tinting logic

      Cleanup compositor button tinting logic.
      -Follow a consistent pattern of setting defaults, then potentially
      overriding, then setting once on the button.
      -Also fix pre-existing bug where the NTB prioritized dark mode colors
      over Incognito colors.
      Bug: 501488283
      Change-Id: Ic87595e47189098f344c53bddc75e4b822b0e5ba
      Commit-Queue: Neil Coronado <ne...@google.com>
      Reviewed-by: Michael Wu <mk...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1653413}
      Files:
      • M chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
      • M chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
      • M chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTab.java
      • M chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutTrailingButtonsCoordinator.java
      Change size: M
      Delta: 4 files changed, 80 insertions(+), 127 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Michael Wu
      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: Ic87595e47189098f344c53bddc75e4b822b0e5ba
      Gerrit-Change-Number: 7960504
      Gerrit-PatchSet: 5
      Gerrit-Owner: Neil Coronado <ne...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages