fix: allow iframe-initiated HTML fullscreen to exit while in macOS fullscreen (7-1-x) (#21021)

* fix: explicitly resize the contents when exiting html fullscreen while in OS fullscreen

* test: ensure HTML fullscreen toggles while in OS fullscreen
This commit is contained in:
loc
2019-11-07 15:58:50 -05:00
committed by Samuel Attard
parent 1b0ba71973
commit c5abb17569
4 changed files with 127 additions and 7 deletions

View File

@@ -344,6 +344,13 @@ void CommonWebContentsDelegate::ExitFullscreenModeForTab(
return;
SetHtmlApiFullscreen(false);
owner_window_->NotifyWindowLeaveHtmlFullScreen();
if (native_fullscreen_) {
// Explicitly trigger a view resize, as the size is not actually changing if
// the browser is fullscreened, too. Chrome does this indirectly from
// `chrome/browser/ui/exclusive_access/fullscreen_controller.cc`.
source->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
}
}
bool CommonWebContentsDelegate::IsFullscreenForTabOrPending(