fix: pressing ESC should exit fullscreen from webview (#30128)

This commit is contained in:
Cheng Zhao
2021-07-26 17:34:04 +09:00
committed by GitHub
parent 64c6737bb2
commit c8ab43a766
2 changed files with 31 additions and 4 deletions

View File

@@ -3629,9 +3629,7 @@ void WebContents::UpdateHtmlApiFullscreen(bool fullscreen) {
manager->ForEachGuest(
web_contents(), base::BindRepeating([](content::WebContents* guest) {
WebContents* api_web_contents = WebContents::From(guest);
// Use UpdateHtmlApiFullscreen instead of SetXXX becuase there is no
// need to interact with the owner window.
api_web_contents->UpdateHtmlApiFullscreen(false);
api_web_contents->SetHtmlApiFullscreen(false);
return false;
}));
}