fix: html fullscreen transitions stacking (#32905)

* fix: html fullscreen transitions stacking

* spec: move webview test to spec-main
This commit is contained in:
Shelley Vohr 2022-06-07 18:59:50 +02:00 committed by GitHub
parent f44ecb7f03
commit 16db5a112e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 184 additions and 61 deletions

View file

@ -3673,7 +3673,12 @@ void WebContents::EnumerateDirectory(
bool WebContents::IsFullscreenForTabOrPending(
const content::WebContents* source) {
return html_fullscreen_;
bool transition_fs = owner_window()
? owner_window()->fullscreen_transition_state() !=
NativeWindow::FullScreenTransitionState::NONE
: false;
return html_fullscreen_ || transition_fs;
}
bool WebContents::TakeFocus(content::WebContents* source, bool reverse) {
@ -3995,9 +4000,8 @@ void WebContents::SetHtmlApiFullscreen(bool enter_fullscreen) {
? !web_preferences->ShouldDisableHtmlFullscreenWindowResize()
: true;
if (html_fullscreenable) {
if (html_fullscreenable)
owner_window_->SetFullScreen(enter_fullscreen);
}
UpdateHtmlApiFullscreen(enter_fullscreen);
native_fullscreen_ = false;