Android: only reset content-fits-window when cutout code owns the state [chromium/src : main]

0 views
Skip to first unread message

Sinan Sahin (Gerrit)

unread,
Jul 14, 2026, 2:10:18 PM (5 days ago) Jul 14
to Helmut Januschka, Charles Hager, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Charles Hager and Helmut Januschka

Sinan Sahin added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Sinan Sahin . resolved

Charles, could you take a look? This is to fix b/533278409

Open in Gerrit

Related details

Attention is currently required from:
  • Charles Hager
  • Helmut Januschka
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: Ied18892064b2f1b2d5ea8ddde5ee0d3cdf671749
Gerrit-Change-Number: 8089176
Gerrit-PatchSet: 1
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Charles Hager <clh...@google.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Sinan Sahin <sinan...@google.com>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Charles Hager <clh...@google.com>
Gerrit-Comment-Date: Tue, 14 Jul 2026 18:10:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Charles Hager (Gerrit)

unread,
Jul 16, 2026, 4:31:40 PM (3 days ago) Jul 16
to Helmut Januschka, Sinan Sahin, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Helmut Januschka

Charles Hager added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTabHelper.java
Line 176, Patchset 1 (Latest): edgeToEdgeManager.setContentFitsWindowInsets(true);
Charles Hager . unresolved

I don't think this is the right fix, because others could have tokens. I think the issue is actually that the status bar color just doesn't get set in the CCT.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
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: Ied18892064b2f1b2d5ea8ddde5ee0d3cdf671749
    Gerrit-Change-Number: 8089176
    Gerrit-PatchSet: 1
    Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Charles Hager <clh...@google.com>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-CC: Sinan Sahin <sinan...@google.com>
    Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 20:31:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Charles Hager (Gerrit)

    unread,
    Jul 16, 2026, 4:51:48 PM (3 days ago) Jul 16
    to Helmut Januschka, Sinan Sahin, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Helmut Januschka

    Charles Hager added 1 comment

    File chrome/android/java/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTabHelper.java
    Line 176, Patchset 1 (Latest): edgeToEdgeManager.setContentFitsWindowInsets(true);
    Charles Hager . unresolved

    I don't think this is the right fix, because others could have tokens. I think the issue is actually that the status bar color just doesn't get set in the CCT.

    Charles Hager

    Yeah, I'm seeing the status bar color going through correctly, I think the issue is that the display cutout controller doesn't want to draw this page edge-to-edge.

    Gerrit-Comment-Date: Thu, 16 Jul 2026 20:51:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Charles Hager <clh...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Helmut Januschka (Gerrit)

    unread,
    Jul 17, 2026, 4:35:42 PM (2 days ago) Jul 17
    to Charles Hager, Sinan Sahin, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Charles Hager

    Helmut Januschka added 1 comment

    File chrome/android/java/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTabHelper.java
    Line 176, Patchset 1: edgeToEdgeManager.setContentFitsWindowInsets(true);
    Charles Hager . unresolved

    I don't think this is the right fix, because others could have tokens. I think the issue is actually that the status bar color just doesn't get set in the CCT.

    Charles Hager

    Yeah, I'm seeing the status bar color going through correctly, I think the issue is that the display cutout controller doesn't want to draw this page edge-to-edge.

    Helmut Januschka

    you're right on both counts, the controller decides "not edge-to-edge" for that CCT page and then force-resets `contentFitsWindowInsets(true)` on every update, stomping whatever `EdgeToEdgeControllerImpl` set. that's the actual offline-CCT break, not the color path.

    updated this CL to address your token concern:

    • flag off: helper never acquires, never writes -> true no-op, fixes the offline CCT on all devices (incl. pre-15 bottom-chin, where an `isEdgeToEdgeEverywhereEnabled` check wouldn't help)
    • flag on: writes only on its own acquire/release transitions, and release checks `EdgeToEdgeStateProvider.isEdgeToEdgeEnabledForWindow()` so remaining token holders (immersive mode etc.) keep their state

    also tracked down the fullscreen-PWA -> CCT toolbar overlap from the issue (https://issues.chromium.org/issues/407420295#comment95). that was a separate bug from disabling `EdgeToEdgeLayoutCoordinator` for the whole WebappActivity lifetime. split the fix into:

    naive me thinks these make 8111480 unnecessary, the everywhere check there force-writes `contentFits=false` on every update, while this keeps the state owner-specific and restores toolbar insets when leaving app mode. sorry this turned into edge-to-edge archaeology :/. PTAL.


    sorry for putting so much work on your side :(

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Charles Hager
    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: Ied18892064b2f1b2d5ea8ddde5ee0d3cdf671749
    Gerrit-Change-Number: 8089176
    Gerrit-PatchSet: 2
    Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Charles Hager <clh...@google.com>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-CC: Sinan Sahin <sinan...@google.com>
    Gerrit-Attention: Charles Hager <clh...@google.com>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 20:35:21 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Helmut Januschka (Gerrit)

    unread,
    Jul 18, 2026, 4:27:16 PM (15 hours ago) Jul 18
    to Charles Hager, Sinan Sahin, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Charles Hager

    Helmut Januschka added 1 comment

    File chrome/android/java/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTabHelper.java
    Line 176, Patchset 1: edgeToEdgeManager.setContentFitsWindowInsets(true);
    Charles Hager . unresolved

    I don't think this is the right fix, because others could have tokens. I think the issue is actually that the status bar color just doesn't get set in the CCT.

    Charles Hager

    Yeah, I'm seeing the status bar color going through correctly, I think the issue is that the display cutout controller doesn't want to draw this page edge-to-edge.

    Helmut Januschka

    you're right on both counts, the controller decides "not edge-to-edge" for that CCT page and then force-resets `contentFitsWindowInsets(true)` on every update, stomping whatever `EdgeToEdgeControllerImpl` set. that's the actual offline-CCT break, not the color path.

    updated this CL to address your token concern:

    • flag off: helper never acquires, never writes -> true no-op, fixes the offline CCT on all devices (incl. pre-15 bottom-chin, where an `isEdgeToEdgeEverywhereEnabled` check wouldn't help)
    • flag on: writes only on its own acquire/release transitions, and release checks `EdgeToEdgeStateProvider.isEdgeToEdgeEnabledForWindow()` so remaining token holders (immersive mode etc.) keep their state

    also tracked down the fullscreen-PWA -> CCT toolbar overlap from the issue (https://issues.chromium.org/issues/407420295#comment95). that was a separate bug from disabling `EdgeToEdgeLayoutCoordinator` for the whole WebappActivity lifetime. split the fix into:

    naive me thinks these make 8111480 unnecessary, the everywhere check there force-writes `contentFits=false` on every update, while this keeps the state owner-specific and restores toolbar insets when leaving app mode. sorry this turned into edge-to-edge archaeology :/. PTAL.


    sorry for putting so much work on your side :(

    Helmut Januschka

    quick update: new PS on 8117613 kills your token concern for good, wrapper now just follows the *aggregate* `EdgeToEdgeStateProvider` token state.

    last token released = content-fits restored, doesn't matter who held it.
    no more per-component writes racing each other.

    bonus finds from device testing: `ImmersiveModeController` supplier created a fresh instance per `get()` so `exitImmersiveMode()` was a no-op, memoized now. and immersive yields when browser controls show up in app mode (contextual search child tab).

    full sampler suite manually tested and green.

    get prebuild APKS: https://static.januschka.com/i-407420295/index.html
    (includes this CL + 8117612 + 8117613)

    PTAL!

    Gerrit-Comment-Date: Sat, 18 Jul 2026 20:26:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
    Comment-In-Reply-To: Charles Hager <clh...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages