[ios] Support forced fullscreen in FullscreenRefactoring [chromium/src : main]

0 views
Skip to first unread message

Scott Yoder (Gerrit)

unread,
Apr 16, 2026, 4:36:06 PM (7 days ago) Apr 16
to Aliona Dangla, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Aliona Dangla and Gauthier Ambard

Scott Yoder voted and added 1 comment

Votes added by Scott Yoder

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Scott Yoder . resolved

Please take a look. I could have stored a count like FullscreenModel (force_fullscreen_mode_counter_), but then I would have also had to store whatever the last trigger was. I felt like conceptually a stack is easier to understand, but can switch it back if that is preferred.

Also, if you are interested, I had Jetski document the use cases where fullscreen is entered: https://crbug.com/500669310#comment4

My open questions are: What if we try to force fullscreen when fullscreen is disabled? What if we try to disable fullscreen when fullscreen is forced?

Open in Gerrit

Related details

Attention is currently required from:
  • Aliona Dangla
  • Gauthier Ambard
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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
Gerrit-Change-Number: 7766245
Gerrit-PatchSet: 4
Gerrit-Owner: Scott Yoder <scott...@google.com>
Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
Gerrit-Reviewer: Scott Yoder <scott...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Hira Mahmood <hiram...@google.com>
Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
Gerrit-Comment-Date: Thu, 16 Apr 2026 20:35:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Gauthier Ambard (Gerrit)

unread,
Apr 17, 2026, 4:54:33 AM (6 days ago) Apr 17
to Scott Yoder, Aliona Dangla, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Aliona Dangla and Scott Yoder

Gauthier Ambard added 1 comment

File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
Line 107, Patchset 4 (Latest): if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
Gauthier Ambard . unresolved

I don't understand this logic.
It is worth adding a comment at least

Open in Gerrit

Related details

Attention is currently required from:
  • Aliona Dangla
  • Scott Yoder
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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 4
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 08:54:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aliona Dangla (Gerrit)

    unread,
    Apr 17, 2026, 7:45:50 AM (6 days ago) Apr 17
    to Scott Yoder, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Scott Yoder

    Aliona Dangla added 1 comment

    File ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
    Line 2905, Patchset 4 (Latest): enterFullscreenWithTrigger:FullscreenModeTransitionTrigger::
    kForcedByCode
    Aliona Dangla . unresolved

    use `trigger`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Scott Yoder
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 4
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 11:45:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Yoder (Gerrit)

    unread,
    Apr 17, 2026, 9:05:11 AM (6 days ago) Apr 17
    to Aliona Dangla, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Aliona Dangla and Gauthier Ambard

    Scott Yoder added 2 comments

    File ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
    Line 2905, Patchset 4: enterFullscreenWithTrigger:FullscreenModeTransitionTrigger::
    kForcedByCode
    Aliona Dangla . resolved

    use `trigger`

    Scott Yoder

    Done

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 107, Patchset 4: if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
    Gauthier Ambard . unresolved

    I don't understand this logic.
    It is worth adding a comment at least

    Scott Yoder

    I've added a comment. The existing code (in FullscreenModel::ResetForNavigation), exits fullscreen unless it was forced by the user. This logic attempts to do the same thing.

    However, I think there is a bug in that FullscreenModel method when Fullscreen is forced but not by the user - it decrements force_fullscreen_mode_counter_ and then exits fullscreen by setting the progress to 1. But what if the count is still greater than zero? Should it reset the count to zero? Here, it pops the stack to empty it unless it encounters a kForcedByUser. I think this is what it should do, but happy to discuss it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aliona Dangla
    • Gauthier Ambard
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 6
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 13:05:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aliona Dangla <aliona...@chromium.org>
    Comment-In-Reply-To: Gauthier Ambard <gam...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gauthier Ambard (Gerrit)

    unread,
    Apr 17, 2026, 10:34:08 AM (6 days ago) Apr 17
    to Scott Yoder, Aliona Dangla, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Aliona Dangla and Scott Yoder

    Gauthier Ambard added 2 comments

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 107, Patchset 4: if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
    Gauthier Ambard . unresolved

    I don't understand this logic.
    It is worth adding a comment at least

    Scott Yoder

    I've added a comment. The existing code (in FullscreenModel::ResetForNavigation), exits fullscreen unless it was forced by the user. This logic attempts to do the same thing.

    However, I think there is a bug in that FullscreenModel method when Fullscreen is forced but not by the user - it decrements force_fullscreen_mode_counter_ and then exits fullscreen by setting the progress to 1. But what if the count is still greater than zero? Should it reset the count to zero? Here, it pops the stack to empty it unless it encounters a kForcedByUser. I think this is what it should do, but happy to discuss it.

    Gauthier Ambard

    Isn't exiting fullscreen on navigation a security requirement?
    Can you give a step breakdown of when this could happen?

    File ios/chrome/browser/fullscreen/public/fullscreen_metrics.h
    Line 28, Patchset 6 (Latest): // Reported when exiting fullscreen mode by tapping on the toolbar.
    Gauthier Ambard . unresolved

    This only mentions "exiting" fullscreen, which is why the code is a bit weird. Is it also used when entering fullscreen?
    In which case the user is force-entering fullscreen and we won't exit on navigations?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aliona Dangla
    • Scott Yoder
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 6
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 14:33:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Scott Yoder <scott...@google.com>
    Comment-In-Reply-To: Gauthier Ambard <gam...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Yoder (Gerrit)

    unread,
    Apr 17, 2026, 3:12:39 PM (6 days ago) Apr 17
    to Aliona Dangla, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Aliona Dangla and Gauthier Ambard

    Scott Yoder added 2 comments

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 107, Patchset 4: if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
    Gauthier Ambard . unresolved

    I don't understand this logic.
    It is worth adding a comment at least

    Scott Yoder

    I've added a comment. The existing code (in FullscreenModel::ResetForNavigation), exits fullscreen unless it was forced by the user. This logic attempts to do the same thing.

    However, I think there is a bug in that FullscreenModel method when Fullscreen is forced but not by the user - it decrements force_fullscreen_mode_counter_ and then exits fullscreen by setting the progress to 1. But what if the count is still greater than zero? Should it reset the count to zero? Here, it pops the stack to empty it unless it encounters a kForcedByUser. I think this is what it should do, but happy to discuss it.

    Gauthier Ambard

    Isn't exiting fullscreen on navigation a security requirement?
    Can you give a step breakdown of when this could happen?

    Scott Yoder

    The only place that calls EnterFullscreen with a trigger of `kForcedByUser` is the new Overflow Menu item "Hide Toolbars" that manually enters fullscreen. This is a feature that @aliona...@chromium.org just finished. This change carries over that functionality where it does not exit fullscreen except by tapping the toolbar.

    There really are not that many places that programmatically enter fullscreen - I had jetski document them here: http://crbug.com/500669310#comment4

    File ios/chrome/browser/fullscreen/public/fullscreen_metrics.h
    Line 28, Patchset 6: // Reported when exiting fullscreen mode by tapping on the toolbar.
    Gauthier Ambard . resolved

    This only mentions "exiting" fullscreen, which is why the code is a bit weird. Is it also used when entering fullscreen?
    In which case the user is force-entering fullscreen and we won't exit on navigations?

    Scott Yoder

    I've updated the comment here. The new "Hide Toolbars" item in the Overflow Menu uses `kForcedByUser` when entering fullscreen.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aliona Dangla
    • Gauthier Ambard
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 7
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 19:12:35 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aliona Dangla (Gerrit)

    unread,
    Apr 20, 2026, 7:22:11 AM (3 days ago) Apr 20
    to Scott Yoder, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Gauthier Ambard and Scott Yoder

    Aliona Dangla added 1 comment

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 107, Patchset 4: if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
    Gauthier Ambard . unresolved

    I don't understand this logic.
    It is worth adding a comment at least

    Scott Yoder

    I've added a comment. The existing code (in FullscreenModel::ResetForNavigation), exits fullscreen unless it was forced by the user. This logic attempts to do the same thing.

    However, I think there is a bug in that FullscreenModel method when Fullscreen is forced but not by the user - it decrements force_fullscreen_mode_counter_ and then exits fullscreen by setting the progress to 1. But what if the count is still greater than zero? Should it reset the count to zero? Here, it pops the stack to empty it unless it encounters a kForcedByUser. I think this is what it should do, but happy to discuss it.

    Gauthier Ambard

    Isn't exiting fullscreen on navigation a security requirement?
    Can you give a step breakdown of when this could happen?

    Scott Yoder

    The only place that calls EnterFullscreen with a trigger of `kForcedByUser` is the new Overflow Menu item "Hide Toolbars" that manually enters fullscreen. This is a feature that @aliona...@chromium.org just finished. This change carries over that functionality where it does not exit fullscreen except by tapping the toolbar.

    There really are not that many places that programmatically enter fullscreen - I had jetski document them here: http://crbug.com/500669310#comment4

    Aliona Dangla

    Note for "Hide Toolbars" you can exit that mode by tap on the collapsed toolbar but also by quit/relaunch the app ; background/foreground the app ; When tapping in a link ; Going back or forward ; See https://b.corp.google.com/issues/444174990/dependencies

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gauthier Ambard
    • Scott Yoder
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 7
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Apr 2026 11:21:53 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Yoder (Gerrit)

    unread,
    Apr 20, 2026, 10:44:18 AM (3 days ago) Apr 20
    to Aliona Dangla, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Aliona Dangla and Gauthier Ambard

    Scott Yoder voted and added 1 comment

    Votes added by Scott Yoder

    Commit-Queue+1

    1 comment

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 107, Patchset 4: if (trigger == FullscreenModeTransitionTrigger::kNavigation) {
    Gauthier Ambard . unresolved

    I don't understand this logic.
    It is worth adding a comment at least

    Scott Yoder

    I've added a comment. The existing code (in FullscreenModel::ResetForNavigation), exits fullscreen unless it was forced by the user. This logic attempts to do the same thing.

    However, I think there is a bug in that FullscreenModel method when Fullscreen is forced but not by the user - it decrements force_fullscreen_mode_counter_ and then exits fullscreen by setting the progress to 1. But what if the count is still greater than zero? Should it reset the count to zero? Here, it pops the stack to empty it unless it encounters a kForcedByUser. I think this is what it should do, but happy to discuss it.

    Gauthier Ambard

    Isn't exiting fullscreen on navigation a security requirement?
    Can you give a step breakdown of when this could happen?

    Scott Yoder

    The only place that calls EnterFullscreen with a trigger of `kForcedByUser` is the new Overflow Menu item "Hide Toolbars" that manually enters fullscreen. This is a feature that @aliona...@chromium.org just finished. This change carries over that functionality where it does not exit fullscreen except by tapping the toolbar.

    There really are not that many places that programmatically enter fullscreen - I had jetski document them here: http://crbug.com/500669310#comment4

    Aliona Dangla

    Note for "Hide Toolbars" you can exit that mode by tap on the collapsed toolbar but also by quit/relaunch the app ; background/foreground the app ; When tapping in a link ; Going back or forward ; See https://b.corp.google.com/issues/444174990/dependencies

    Scott Yoder

    I had the logic backwards for navigation with "Hide Toolbars" - it should always exit Fullscreen on a navigation. In the legacy implementation, it exits if forced by user (i.e. Hide Toolbars), but otherwise does not exit fullscreen. After chatting with Aliona, we've agreed that it should always exit on a navigation regardless of the trigger, so I've updated the CL to implement this for the new implementation.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aliona Dangla
    • Gauthier Ambard
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 8
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Apr 2026 14:44:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Scott Yoder <scott...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aliona Dangla (Gerrit)

    unread,
    Apr 21, 2026, 6:26:59 AM (2 days ago) Apr 21
    to Scott Yoder, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Gauthier Ambard and Scott Yoder

    Aliona Dangla added 3 comments

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.h
    Line 111, Patchset 9 (Latest): std::stack<FullscreenModeTransitionTrigger> forced_triggers_;
    Aliona Dangla . unresolved

    I am not sure we want to keep this stack. Because it does not verify that the trigger being exited actually matches the one at the top of the stack. If multiple features overlap (which should be currently impossible now but we never know), one feature could accidentally pop the other's state, leading to an inconsistent UI state where fullscreen is exited prematurely or incorrectly maintained.

    File ios/chrome/browser/fullscreen/public/fullscreen_metrics.h
    Line 39, Patchset 9 (Latest): kNavigation = 6,
    Aliona Dangla . unresolved

    nit:add comment

    Line 30, Patchset 9 (Latest): // Reported when exiting fullscreen mode by tapping on the toolbar, or when
    Aliona Dangla . unresolved

    or when ENTERING fullscreen mode via a tap on the "Hide Toolbars" item in the overflow menu

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gauthier Ambard
    • Scott Yoder
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 9
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Apr 2026 10:26:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Yoder (Gerrit)

    unread,
    Apr 21, 2026, 10:33:43 AM (2 days ago) Apr 21
    to Aliona Dangla, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Aliona Dangla and Gauthier Ambard

    Scott Yoder voted and added 3 comments

    Votes added by Scott Yoder

    Commit-Queue+1

    3 comments

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.h
    Line 111, Patchset 9: std::stack<FullscreenModeTransitionTrigger> forced_triggers_;
    Aliona Dangla . resolved

    I am not sure we want to keep this stack. Because it does not verify that the trigger being exited actually matches the one at the top of the stack. If multiple features overlap (which should be currently impossible now but we never know), one feature could accidentally pop the other's state, leading to an inconsistent UI state where fullscreen is exited prematurely or incorrectly maintained.

    Scott Yoder

    I think this is fair criticism - the stack isn't really behaving like a stack normally would and isn't adding a lot of value here. I've switched it to using a count, like the implementation in FullscreenModel.

    File ios/chrome/browser/fullscreen/public/fullscreen_metrics.h
    Line 39, Patchset 9: kNavigation = 6,
    Aliona Dangla . resolved

    nit:add comment

    Scott Yoder

    Done

    Line 30, Patchset 9: // Reported when exiting fullscreen mode by tapping on the toolbar, or when
    Aliona Dangla . resolved

    or when ENTERING fullscreen mode via a tap on the "Hide Toolbars" item in the overflow menu

    Scott Yoder

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aliona Dangla
    • Gauthier Ambard
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 10
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Tue, 21 Apr 2026 14:33:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Aliona Dangla <aliona...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aliona Dangla (Gerrit)

    unread,
    12:31 PM (3 hours ago) 12:31 PM
    to Scott Yoder, Gauthier Ambard, Hira Mahmood, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
    Attention needed from Gauthier Ambard and Scott Yoder

    Aliona Dangla added 2 comments

    File ios/chrome/browser/fullscreen/model/fullscreen_browser_agent.mm
    Line 94, Patchset 10 (Latest):void FullscreenBrowserAgent::ExitFullscreen(
    PassKey pass_key,
    FullscreenModeTransitionTrigger trigger,
    bool animated) {
    switch (trigger) {
    case FullscreenModeTransitionTrigger::kNavigation:
    // On a navigation, fullscreen is always exited.
    forced_count_ = 0;
    break;
    default:
    if (forced_count_ > 0) {
    forced_count_--;
    if (forced_count_ > 0) {
    return;
    }
    }
    break;
    }
    Aliona Dangla . unresolved

    With this approach as enter/exit fullscreen is now the same as the forced one, how can we check that we do not call exit too many times for example

    I am expecting that if your forced_count is already == 0 and you force exit, we should hit a CHECK

    File ios/chrome/browser/fullscreen/public/fullscreen_metrics.h
    Line 25, Patchset 10 (Latest): kForcedByCode = 1,
    Aliona Dangla . unresolved

    Should we add `kForcedByFindInPage` and `kForcedByLens` (that enter and exit and we can check that we entered at some point with X or Y feture) so we now where it is coming from and we are 100% that these 2 want a forced mode? to make a difference with a regular exit and a forced one? WDYT

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gauthier Ambard
    • Scott Yoder
    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: I9e5e6a9b053867632f794ef9a73b1eecf8609751
    Gerrit-Change-Number: 7766245
    Gerrit-PatchSet: 10
    Gerrit-Owner: Scott Yoder <scott...@google.com>
    Gerrit-Reviewer: Aliona Dangla <aliona...@chromium.org>
    Gerrit-Reviewer: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Reviewer: Scott Yoder <scott...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Hira Mahmood <hiram...@google.com>
    Gerrit-Attention: Scott Yoder <scott...@google.com>
    Gerrit-Attention: Gauthier Ambard <gam...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Apr 2026 16:31:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages