Skip to content
Commit 2b033c68 authored by Leonard Grey's avatar Leonard Grey Committed by Chromium LUCI CQ
Browse files

Mac: Make FullscreenToolbarController transitions idempotent

Mac content fullscreen causes BrowserView::ProcessFullscreen to be
called twice in a row: once directly, and once as a reaction to the
actual window fullscreen event from the OS. Most of the time, the
second is a no-op since the transition is already in progress, but
the SafeBrowsing fullscreen tests are constructed in a way that delays
the second call.

r870734 caused the code that adjusts the topchrome for fullscreen
to be called directly from ProcessFullscreen, rather than a Mac-only
wrapper. This triggered a DCHECK in the aforementioned tests since
it successfully called into it twice during the transition.

Since whether ProcessFullscreen executes once or twice is really
down to a timing issue, I think it's probably better for us to make
it idempotent.

Bug: 1135060
Change-Id: Ia414fa5d58f506b3dcbece7f8e135e3ea776c50b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2822129


Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#871964}
parent 3cd76a6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment