Skip to content

Commit

Permalink
Do not allow fullscreening during a drag
Browse files Browse the repository at this point in the history
Do not allow a page to attempt to enter fullscreen while it is being
actively dragged. Things break.

(cherry picked from commit 26594d7)

Fixed: 1315080
Change-Id: Ia175339807284a3e0edddfbf8fb26a4b67fdaf04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3601249
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Keren Zhu <kerenzhu@chromium.org>
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#995196}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3601574
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/branch-heads/5005@{#138}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
Avi Drissman authored and Chromium LUCI CQ committed Apr 25, 2022
1 parent b125933 commit b992016
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chrome/browser/ui/browser.cc
Expand Up @@ -1916,6 +1916,11 @@ void Browser::EnumerateDirectory(
bool Browser::CanEnterFullscreenModeForTab(
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) {
// If the tab strip isn't editable then a drag session is in progress, and it
// is not safe to enter fullscreen. https://crbug.com/1315080
if (!tab_strip_model_delegate_->IsTabStripEditable())
return false;

return exclusive_access_manager_->fullscreen_controller()
->CanEnterFullscreenModeForTab(requesting_frame, options.display_id);
}
Expand Down

0 comments on commit b992016

Please sign in to comment.