Reland "Fix toolbar snap-back and stale bitmap capture" [chromium/src : main]

0 views
Skip to first unread message

Alejandro Romano (Gerrit)

unread,
Apr 20, 2026, 9:13:44 PM (10 days ago) Apr 20
to Peilin Wang, Sky Malice, Patrick Noland, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Patrick Noland, Peilin Wang and Sky Malice

Alejandro Romano added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Alejandro Romano . unresolved

Some additional notes on this reland:

In local testing across SPA and MPA navigations, scroll sequences, and route changes, the pre-draw listener approach reduces toolbar bitmap captures by ~60–75% compared to my previous fix. The reduction comes from coalescing multiple invalidations per frame into a single capture, and the listener self-deregistering once the toolbar starts revealing.

Memory: the bisect flagged ~1 MB regression (crbug.com/504007917) in the previous fix. Fewer unnecessary captures could bring it down. Or it could stay the same if the remaining captures are all necessary, which would mean the bitmap cache is working as intended (I believe). Either way it shouldn't be worse.

Also tested manually on a Samsung S21 (ARM64, Android 15). No UI/UX regressions. Done some additional Android x64 tests that would fail in previous CL/patches. All good.

The NullPointerException was a pre-existing latent bug. Our increased capture rate was the first time it was reliably triggered in CI.

Ready for review/CQ Dry Run whenever you want!

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Noland
  • Peilin Wang
  • Sky Malice
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: I16026f902420df64b00a160abb34479cbc6c3f98
Gerrit-Change-Number: 7781125
Gerrit-PatchSet: 1
Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
Gerrit-Reviewer: Peilin Wang <peili...@google.com>
Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
Gerrit-Attention: Peilin Wang <peili...@google.com>
Gerrit-Attention: Patrick Noland <pno...@chromium.org>
Gerrit-Attention: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Tue, 21 Apr 2026 01:13:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alejandro Romano (Gerrit)

unread,
Apr 20, 2026, 10:07:49 PM (10 days ago) Apr 20
to Chromium LUCI CQ, Peilin Wang, Sky Malice, Patrick Noland, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com

Alejandro Romano added 1 comment

Patchset-level comments
Alejandro Romano . unresolved

Some additional notes on this reland:

In local testing across SPA and MPA navigations, scroll sequences, and route changes, the pre-draw listener approach reduces toolbar bitmap captures by ~60–75% compared to my previous fix. The reduction comes from coalescing multiple invalidations per frame into a single capture, and the listener self-deregistering once the toolbar starts revealing.

Memory: the bisect flagged ~1 MB regression (crbug.com/504007917) in the previous fix. Fewer unnecessary captures could bring it down. Or it could stay the same if the remaining captures are all necessary, which would mean the bitmap cache is working as intended (I believe). Either way it shouldn't be worse.

Also tested manually on a Samsung S21 (ARM64, Android 15). No UI/UX regressions. Done some additional Android x64 tests that would fail in previous CL/patches. All good.

The NullPointerException was a pre-existing latent bug. Our increased capture rate was the first time it was reliably triggered in CI.

Ready for review/CQ Dry Run whenever you want!

Alejandro Romano

Oh and please, if I'm speaking non-sense about the memory regression and it's important to address (if this keeps being a problem), please let me know. I don't have the sufficient knowledge to debug it properly and verify the nature of it, but I'm willing to learn of course

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: I16026f902420df64b00a160abb34479cbc6c3f98
Gerrit-Change-Number: 7781125
Gerrit-PatchSet: 2
Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
Gerrit-Reviewer: Peilin Wang <peili...@google.com>
Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
Gerrit-Comment-Date: Tue, 21 Apr 2026 02:07:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alejandro Romano <aleja...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Peilin Wang (Gerrit)

unread,
Apr 24, 2026, 11:00:45 AM (6 days ago) Apr 24
to Alejandro Romano, Patrick Noland, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Alejandro Romano

Peilin Wang added 1 comment

File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
Line 906, Patchset 2 (Latest): if (dirtyRect != null) {
Peilin Wang . unresolved

sorry you're gonna get a merge conflict here, I landed another patch to fix this first cause it was causing crashes in canary/dev

Open in Gerrit

Related details

Attention is currently required from:
  • Alejandro Romano
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: I16026f902420df64b00a160abb34479cbc6c3f98
Gerrit-Change-Number: 7781125
Gerrit-PatchSet: 2
Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
Gerrit-Reviewer: Peilin Wang <peili...@google.com>
Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
Gerrit-Comment-Date: Fri, 24 Apr 2026 15:00:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Peilin Wang (Gerrit)

unread,
Apr 24, 2026, 11:03:20 AM (6 days ago) Apr 24
to Alejandro Romano, Patrick Noland, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Alejandro Romano

Peilin Wang added 1 comment

Patchset-level comments
Alejandro Romano . unresolved

Some additional notes on this reland:

In local testing across SPA and MPA navigations, scroll sequences, and route changes, the pre-draw listener approach reduces toolbar bitmap captures by ~60–75% compared to my previous fix. The reduction comes from coalescing multiple invalidations per frame into a single capture, and the listener self-deregistering once the toolbar starts revealing.

Memory: the bisect flagged ~1 MB regression (crbug.com/504007917) in the previous fix. Fewer unnecessary captures could bring it down. Or it could stay the same if the remaining captures are all necessary, which would mean the bitmap cache is working as intended (I believe). Either way it shouldn't be worse.

Also tested manually on a Samsung S21 (ARM64, Android 15). No UI/UX regressions. Done some additional Android x64 tests that would fail in previous CL/patches. All good.

The NullPointerException was a pre-existing latent bug. Our increased capture rate was the first time it was reliably triggered in CI.

Ready for review/CQ Dry Run whenever you want!

Alejandro Romano

Oh and please, if I'm speaking non-sense about the memory regression and it's important to address (if this keeps being a problem), please let me know. I don't have the sufficient knowledge to debug it properly and verify the nature of it, but I'm willing to learn of course

Peilin Wang

The memory regression can be real. In the past we reduced memory by capturing less often. If we run an A/B test we can see how big/real the regression is in the real world. You can land this patch first and I can run an A/B test after.

Gerrit-Comment-Date: Fri, 24 Apr 2026 15:03:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alejandro Romano <aleja...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alejandro Romano (Gerrit)

unread,
Apr 25, 2026, 2:07:18 PM (5 days ago) Apr 25
to Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
Attention needed from Peilin Wang

Alejandro Romano added 2 comments

Patchset-level comments
File-level comment, Patchset 1:
Alejandro Romano . resolved

Some additional notes on this reland:

In local testing across SPA and MPA navigations, scroll sequences, and route changes, the pre-draw listener approach reduces toolbar bitmap captures by ~60–75% compared to my previous fix. The reduction comes from coalescing multiple invalidations per frame into a single capture, and the listener self-deregistering once the toolbar starts revealing.

Memory: the bisect flagged ~1 MB regression (crbug.com/504007917) in the previous fix. Fewer unnecessary captures could bring it down. Or it could stay the same if the remaining captures are all necessary, which would mean the bitmap cache is working as intended (I believe). Either way it shouldn't be worse.

Also tested manually on a Samsung S21 (ARM64, Android 15). No UI/UX regressions. Done some additional Android x64 tests that would fail in previous CL/patches. All good.

The NullPointerException was a pre-existing latent bug. Our increased capture rate was the first time it was reliably triggered in CI.

Ready for review/CQ Dry Run whenever you want!

Alejandro Romano

Oh and please, if I'm speaking non-sense about the memory regression and it's important to address (if this keeps being a problem), please let me know. I don't have the sufficient knowledge to debug it properly and verify the nature of it, but I'm willing to learn of course

Peilin Wang

The memory regression can be real. In the past we reduced memory by capturing less often. If we run an A/B test we can see how big/real the regression is in the real world. You can land this patch first and I can run an A/B test after.

Alejandro Romano

Got it. Thanks!

File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
Line 906, Patchset 2 (Latest): if (dirtyRect != null) {
Peilin Wang . resolved

sorry you're gonna get a merge conflict here, I landed another patch to fix this first cause it was causing crashes in canary/dev

Alejandro Romano

Got it. Awesome that it's already been taken care of. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Peilin Wang
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: I16026f902420df64b00a160abb34479cbc6c3f98
    Gerrit-Change-Number: 7781125
    Gerrit-PatchSet: 2
    Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
    Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
    Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
    Gerrit-Reviewer: Peilin Wang <peili...@google.com>
    Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
    Gerrit-Attention: Peilin Wang <peili...@google.com>
    Gerrit-Comment-Date: Sat, 25 Apr 2026 18:07:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alejandro Romano <aleja...@gmail.com>
    Comment-In-Reply-To: Peilin Wang <peili...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alejandro Romano (Gerrit)

    unread,
    Apr 25, 2026, 2:26:02 PM (5 days ago) Apr 25
    to Jerome Jiang, Mirko Bonadei, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, cblume...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, mar...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
    Attention needed from Patrick Noland, Peilin Wang and Sky Malice

    Alejandro Romano added 1 comment

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Alejandro Romano . unresolved

    New patchset. Ready for review and a CQ Dry Run.

    Rebased, removed dirtyRect workaround and test in favor of upstream fix.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Patrick Noland
    • Peilin Wang
    • Sky Malice
    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: I16026f902420df64b00a160abb34479cbc6c3f98
      Gerrit-Change-Number: 7781125
      Gerrit-PatchSet: 6
      Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
      Gerrit-Reviewer: Peilin Wang <peili...@google.com>
      Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
      Gerrit-Attention: Peilin Wang <peili...@google.com>
      Gerrit-Attention: Patrick Noland <pno...@chromium.org>
      Gerrit-Attention: Sky Malice <sk...@chromium.org>
      Gerrit-Comment-Date: Sat, 25 Apr 2026 18:25:45 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:40:08 AM (5 days ago) Apr 26
      to Jerome Jiang, Mirko Bonadei, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, cblume...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, mar...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed Jerome Jiang from this change

      Deleted Reviewers:
      • Jerome Jiang
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Patrick Noland
      • Peilin Wang
      • Sky Malice
      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: deleteReviewer
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I16026f902420df64b00a160abb34479cbc6c3f98
      Gerrit-Change-Number: 7781125
      Gerrit-PatchSet: 6
      Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
      Gerrit-Reviewer: Peilin Wang <peili...@google.com>
      Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:40:09 AM (5 days ago) Apr 26
      to Mirko Bonadei, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, cblume...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, mar...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed Mirko Bonadei from this change

      Deleted Reviewers:
      • Mirko Bonadei
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:40:17 AM (5 days ago) Apr 26
      to net-r...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, cblume...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed net-r...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:40:17 AM (5 days ago) Apr 26
      to mar...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, cblume...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, net-r...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed mar...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:23 AM (5 days ago) Apr 26
      to cblume...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, chrome-intell...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed cblume...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:24 AM (5 days ago) Apr 26
      to chrome-intell...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed chrome-intell...@chromium.org from this change

      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:26 AM (5 days ago) Apr 26
      to devtools...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, chrome-intelligence-te...@google.com, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed devtools...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:28 AM (5 days ago) Apr 26
      to chrome-intelligence-te...@google.com, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed chrome-intelligence-te...@google.com from this change

      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:30 AM (5 days ago) Apr 26
      to feature-me...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, hanxi...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed feature-me...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:41:35 AM (5 days ago) Apr 26
      to hanxi...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, jz...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed hanxi...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:42:23 AM (5 days ago) Apr 26
      to jz...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, fgal...@chromium.org, penghuan...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed jz...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:42:25 AM (5 days ago) Apr 26
      to fgal...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, penghuan...@chromium.org, peilinwa...@google.com
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed fgal...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:42:26 AM (5 days ago) Apr 26
      to peilinwa...@google.com, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org, penghuan...@chromium.org
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed peilinwa...@google.com from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 26, 2026, 3:42:37 AM (5 days ago) Apr 26
      to penghuan...@chromium.org, android-bu...@system.gserviceaccount.com, Patrick Noland, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano removed penghuan...@chromium.org from this change

      Deleted Reviewers:
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 27, 2026, 12:53:41 PM (3 days ago) Apr 27
      to Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Peilin Wang, Sky Malice, chromium...@chromium.org
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano added 2 comments

      Patchset-level comments
      File-level comment, Patchset 6:
      Alejandro Romano . resolved

      New patchset. Ready for review and a CQ Dry Run.

      Rebased, removed dirtyRect workaround and test in favor of upstream fix.

      Alejandro Romano

      Done

      File-level comment, Patchset 7 (Latest):
      Alejandro Romano . unresolved

      Patchset 7. Rebased. Please trigger a CQ Run when ready!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Patrick Noland
      • Peilin Wang
      • Sky Malice
      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: I16026f902420df64b00a160abb34479cbc6c3f98
      Gerrit-Change-Number: 7781125
      Gerrit-PatchSet: 7
      Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
      Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
      Gerrit-Reviewer: Peilin Wang <peili...@google.com>
      Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
      Gerrit-Attention: Peilin Wang <peili...@google.com>
      Gerrit-Attention: Patrick Noland <pno...@chromium.org>
      Gerrit-Attention: Sky Malice <sk...@chromium.org>
      Gerrit-Comment-Date: Mon, 27 Apr 2026 16:53:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Alejandro Romano <aleja...@gmail.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alejandro Romano (Gerrit)

      unread,
      Apr 27, 2026, 3:10:03 PM (3 days ago) Apr 27
      to Peilin Wang, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
      Attention needed from Patrick Noland, Peilin Wang and Sky Malice

      Alejandro Romano added 1 comment

      Patchset-level comments
      Alejandro Romano . resolved

      Patchset 7. Rebased. Please trigger a CQ Run when ready!

      Alejandro Romano

      All tests passing! Resolving this comment

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Patrick Noland
      • Peilin Wang
      • Sky Malice
      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: I16026f902420df64b00a160abb34479cbc6c3f98
        Gerrit-Change-Number: 7781125
        Gerrit-PatchSet: 7
        Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
        Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
        Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
        Gerrit-Reviewer: Peilin Wang <peili...@google.com>
        Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
        Gerrit-Attention: Peilin Wang <peili...@google.com>
        Gerrit-Attention: Patrick Noland <pno...@chromium.org>
        Gerrit-Attention: Sky Malice <sk...@chromium.org>
        Gerrit-Comment-Date: Mon, 27 Apr 2026 19:09:54 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Peilin Wang (Gerrit)

        unread,
        Apr 27, 2026, 6:16:00 PM (3 days ago) Apr 27
        to Alejandro Romano, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
        Attention needed from Alejandro Romano, Patrick Noland and Sky Malice

        Peilin Wang added 1 comment

        File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
        Line 705, Patchset 7 (Latest): private boolean onHiddenCapturePreDraw() {
        Peilin Wang . unresolved

        does this get called from anywhere?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alejandro Romano
        • Patrick Noland
        • Sky Malice
        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: I16026f902420df64b00a160abb34479cbc6c3f98
          Gerrit-Change-Number: 7781125
          Gerrit-PatchSet: 7
          Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
          Gerrit-Reviewer: Peilin Wang <peili...@google.com>
          Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
          Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Attention: Patrick Noland <pno...@chromium.org>
          Gerrit-Attention: Sky Malice <sk...@chromium.org>
          Gerrit-Comment-Date: Mon, 27 Apr 2026 22:15:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alejandro Romano (Gerrit)

          unread,
          Apr 27, 2026, 6:44:57 PM (3 days ago) Apr 27
          to Peilin Wang, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
          Attention needed from Peilin Wang

          Alejandro Romano added 1 comment

          File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
          Line 705, Patchset 7 (Latest): private boolean onHiddenCapturePreDraw() {
          Peilin Wang . unresolved

          does this get called from anywhere?

          Alejandro Romano

          not really, only from the line above it, mHiddenCaptureOnPreDraw. I can turn it into a simpler = () -> {} inline

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Peilin Wang
          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: I16026f902420df64b00a160abb34479cbc6c3f98
          Gerrit-Change-Number: 7781125
          Gerrit-PatchSet: 7
          Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
          Gerrit-Reviewer: Peilin Wang <peili...@google.com>
          Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
          Gerrit-Attention: Peilin Wang <peili...@google.com>
          Gerrit-Comment-Date: Mon, 27 Apr 2026 22:44:51 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Peilin Wang <peili...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Peilin Wang (Gerrit)

          unread,
          Apr 28, 2026, 1:48:49 PM (2 days ago) Apr 28
          to Alejandro Romano, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
          Attention needed from Alejandro Romano

          Peilin Wang added 1 comment

          File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
          Line 705, Patchset 7 (Latest): private boolean onHiddenCapturePreDraw() {
          Peilin Wang . unresolved

          does this get called from anywhere?

          Alejandro Romano

          not really, only from the line above it, mHiddenCaptureOnPreDraw. I can turn it into a simpler = () -> {} inline

          Peilin Wang

          Declaring+initializing OnPreDrawListener will call this function?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alejandro Romano
          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: I16026f902420df64b00a160abb34479cbc6c3f98
          Gerrit-Change-Number: 7781125
          Gerrit-PatchSet: 7
          Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
          Gerrit-Reviewer: Peilin Wang <peili...@google.com>
          Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
          Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Comment-Date: Tue, 28 Apr 2026 17:48:39 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alejandro Romano (Gerrit)

          unread,
          Apr 28, 2026, 2:02:30 PM (2 days ago) Apr 28
          to Peilin Wang, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
          Attention needed from Peilin Wang

          Alejandro Romano added 1 comment

          File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
          Line 705, Patchset 7 (Latest): private boolean onHiddenCapturePreDraw() {
          Peilin Wang . unresolved

          does this get called from anywhere?

          Alejandro Romano

          not really, only from the line above it, mHiddenCaptureOnPreDraw. I can turn it into a simpler = () -> {} inline

          Peilin Wang

          Declaring+initializing OnPreDrawListener will call this function?

          Alejandro Romano

          No, it just stores a reference to `onHiddenCapturePreDraw()`. It won't initialize it right away.

          We do that to pass the same `mHiddenCaptureOnPreDraw` object to both `addOnPreDrawListener()` and `removeOnPreDrawListener()`. If we passed `this::onHiddenCapturePreDraw` directly each time, each call would create a new object with no way to unregister it, if that makes sense.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Peilin Wang
          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: I16026f902420df64b00a160abb34479cbc6c3f98
          Gerrit-Change-Number: 7781125
          Gerrit-PatchSet: 7
          Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
          Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
          Gerrit-Reviewer: Peilin Wang <peili...@google.com>
          Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
          Gerrit-Attention: Peilin Wang <peili...@google.com>
          Gerrit-Comment-Date: Tue, 28 Apr 2026 18:02:20 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Peilin Wang (Gerrit)

          unread,
          Apr 28, 2026, 3:04:10 PM (2 days ago) Apr 28
          to Alejandro Romano, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
          Attention needed from Alejandro Romano

          Peilin Wang added 1 comment

          File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
          Line 705, Patchset 7 (Latest): private boolean onHiddenCapturePreDraw() {
          Peilin Wang . resolved

          does this get called from anywhere?

          Alejandro Romano

          not really, only from the line above it, mHiddenCaptureOnPreDraw. I can turn it into a simpler = () -> {} inline

          Peilin Wang

          Declaring+initializing OnPreDrawListener will call this function?

          Alejandro Romano

          No, it just stores a reference to `onHiddenCapturePreDraw()`. It won't initialize it right away.

          We do that to pass the same `mHiddenCaptureOnPreDraw` object to both `addOnPreDrawListener()` and `removeOnPreDrawListener()`. If we passed `this::onHiddenCapturePreDraw` directly each time, each call would create a new object with no way to unregister it, if that makes sense.

          Peilin Wang

          Ah sorry I didn't see you're adding the listener on line 802...

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alejandro Romano
          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: I16026f902420df64b00a160abb34479cbc6c3f98
            Gerrit-Change-Number: 7781125
            Gerrit-PatchSet: 7
            Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
            Gerrit-Reviewer: Peilin Wang <peili...@google.com>
            Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
            Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Comment-Date: Tue, 28 Apr 2026 19:04:00 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Peilin Wang (Gerrit)

            unread,
            Apr 28, 2026, 3:21:56 PM (2 days ago) Apr 28
            to Alejandro Romano, Patrick Noland, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
            Attention needed from Alejandro Romano

            Peilin Wang voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Alejandro Romano
            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: I16026f902420df64b00a160abb34479cbc6c3f98
            Gerrit-Change-Number: 7781125
            Gerrit-PatchSet: 7
            Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
            Gerrit-Reviewer: Peilin Wang <peili...@google.com>
            Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
            Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
            Gerrit-Comment-Date: Tue, 28 Apr 2026 19:21:42 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Patrick Noland (Gerrit)

            unread,
            Apr 29, 2026, 1:01:03 PM (yesterday) Apr 29
            to Alejandro Romano, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
            Attention needed from Alejandro Romano

            Patrick Noland voted and added 1 comment

            Votes added by Patrick Noland

            Code-Review+1

            1 comment

            File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
            Line 806, Patchset 7 (Latest): private boolean shouldCaptureWhileHidden() {
            Patrick Noland . unresolved

            Since this is only used once, you could fold the `!mHiddenCaptureRegistered` check into the method and rename to `shouldRegisterHiddenCapturePreDrawListener` . up to you

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Alejandro Romano
            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: I16026f902420df64b00a160abb34479cbc6c3f98
              Gerrit-Change-Number: 7781125
              Gerrit-PatchSet: 7
              Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
              Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
              Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
              Gerrit-Reviewer: Peilin Wang <peili...@google.com>
              Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
              Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
              Gerrit-Comment-Date: Wed, 29 Apr 2026 17:00:49 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Alejandro Romano (Gerrit)

              unread,
              Apr 29, 2026, 2:13:28 PM (yesterday) Apr 29
              to Patrick Noland, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
              Attention needed from Patrick Noland

              Alejandro Romano added 1 comment

              File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
              Line 806, Patchset 7 (Latest): private boolean shouldCaptureWhileHidden() {
              Patrick Noland . unresolved

              Since this is only used once, you could fold the `!mHiddenCaptureRegistered` check into the method and rename to `shouldRegisterHiddenCapturePreDrawListener` . up to you

              Alejandro Romano

              You mean `shouldCaptureWhileHidden` being used once? It is used in three places

              • Line 706: inside onHiddenCapturePreDraw() to decide whether to deregister
              • Line 715: inside the posted runnable to re-check before capturing
              • Line 798: at registration time, combined with !mHiddenCaptureRegistered

              That's why it exists as its own function

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Patrick Noland
              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: I16026f902420df64b00a160abb34479cbc6c3f98
              Gerrit-Change-Number: 7781125
              Gerrit-PatchSet: 7
              Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
              Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
              Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
              Gerrit-Reviewer: Peilin Wang <peili...@google.com>
              Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
              Gerrit-Attention: Patrick Noland <pno...@chromium.org>
              Gerrit-Comment-Date: Wed, 29 Apr 2026 18:13:17 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Patrick Noland <pno...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Patrick Noland (Gerrit)

              unread,
              Apr 29, 2026, 2:32:59 PM (yesterday) Apr 29
              to Alejandro Romano, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
              Attention needed from Alejandro Romano

              Patrick Noland added 1 comment

              File chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
              Line 806, Patchset 7 (Latest): private boolean shouldCaptureWhileHidden() {
              Patrick Noland . resolved

              Since this is only used once, you could fold the `!mHiddenCaptureRegistered` check into the method and rename to `shouldRegisterHiddenCapturePreDrawListener` . up to you

              Alejandro Romano

              You mean `shouldCaptureWhileHidden` being used once? It is used in three places

              • Line 706: inside onHiddenCapturePreDraw() to decide whether to deregister
              • Line 715: inside the posted runnable to re-check before capturing
              • Line 798: at registration time, combined with !mHiddenCaptureRegistered

              That's why it exists as its own function

              Patrick Noland

              Ah nm, my ctrl-f failed

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Alejandro Romano
              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: I16026f902420df64b00a160abb34479cbc6c3f98
                Gerrit-Change-Number: 7781125
                Gerrit-PatchSet: 7
                Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
                Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
                Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
                Gerrit-Reviewer: Peilin Wang <peili...@google.com>
                Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
                Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
                Gerrit-Comment-Date: Wed, 29 Apr 2026 18:32:49 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Alejandro Romano <aleja...@gmail.com>
                Comment-In-Reply-To: Patrick Noland <pno...@chromium.org>
                satisfied_requirement
                open
                diffy

                Alejandro Romano (Gerrit)

                unread,
                Apr 29, 2026, 3:31:57 PM (yesterday) Apr 29
                to Patrick Noland, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org

                Alejandro Romano 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: I16026f902420df64b00a160abb34479cbc6c3f98
                Gerrit-Change-Number: 7781125
                Gerrit-PatchSet: 7
                Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
                Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
                Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
                Gerrit-Reviewer: Peilin Wang <peili...@google.com>
                Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
                Gerrit-Comment-Date: Wed, 29 Apr 2026 19:31:49 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Alejandro Romano (Gerrit)

                unread,
                1:46 PM (8 hours ago) 1:46 PM
                to Patrick Noland, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
                Attention needed from Patrick Noland and Peilin Wang

                Alejandro Romano added 1 comment

                Patchset-level comments
                File-level comment, Patchset 8 (Latest):
                Alejandro Romano . resolved

                Rebased. PTAL!

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Patrick Noland
                • Peilin Wang
                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: I16026f902420df64b00a160abb34479cbc6c3f98
                  Gerrit-Change-Number: 7781125
                  Gerrit-PatchSet: 8
                  Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
                  Gerrit-Reviewer: Peilin Wang <peili...@google.com>
                  Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
                  Gerrit-Attention: Peilin Wang <peili...@google.com>
                  Gerrit-Attention: Patrick Noland <pno...@chromium.org>
                  Gerrit-Comment-Date: Thu, 30 Apr 2026 17:46:50 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Alejandro Romano (Gerrit)

                  unread,
                  3:31 PM (6 hours ago) 3:31 PM
                  to Patrick Noland, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
                  Attention needed from Patrick Noland and Peilin Wang

                  Alejandro Romano added 1 comment

                  Patchset-level comments
                  File-level comment, Patchset 10 (Latest):
                  Alejandro Romano . resolved

                  Sorry, previous rebase was missing some changes. PTAL!

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Patrick Noland
                  • Peilin Wang
                  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: I16026f902420df64b00a160abb34479cbc6c3f98
                  Gerrit-Change-Number: 7781125
                  Gerrit-PatchSet: 10
                  Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
                  Gerrit-Reviewer: Peilin Wang <peili...@google.com>
                  Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
                  Gerrit-Attention: Peilin Wang <peili...@google.com>
                  Gerrit-Attention: Patrick Noland <pno...@chromium.org>
                  Gerrit-Comment-Date: Thu, 30 Apr 2026 19:31:04 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Patrick Noland (Gerrit)

                  unread,
                  6:15 PM (3 hours ago) 6:15 PM
                  to Alejandro Romano, Peilin Wang, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Sky Malice, chromium...@chromium.org
                  Attention needed from Alejandro Romano and Peilin Wang

                  Patrick Noland voted Code-Review+1

                  Code-Review+1
                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Alejandro Romano
                  • Peilin Wang
                  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: I16026f902420df64b00a160abb34479cbc6c3f98
                  Gerrit-Change-Number: 7781125
                  Gerrit-PatchSet: 10
                  Gerrit-Owner: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Reviewer: Patrick Noland <pno...@chromium.org>
                  Gerrit-Reviewer: Peilin Wang <peili...@google.com>
                  Gerrit-Reviewer: Sky Malice <sk...@chromium.org>
                  Gerrit-Attention: Alejandro Romano <aleja...@gmail.com>
                  Gerrit-Attention: Peilin Wang <peili...@google.com>
                  Gerrit-Comment-Date: Thu, 30 Apr 2026 22:15:16 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages