mac: Update CSS on fullscreen window exit (fixes #3597)

This commit is contained in:
Marshall Greenblatt
2023-11-07 16:40:29 -05:00
parent 21e01d4889
commit 3837f209e1
11 changed files with 186 additions and 10 deletions

View File

@@ -633,6 +633,31 @@ void CefBrowserHostBase::NotifyMoveOrResizeStarted() {
#endif
}
bool CefBrowserHostBase::IsFullscreen() {
if (!CEF_CURRENTLY_ON_UIT()) {
DCHECK(false) << "called on invalid thread";
return false;
}
if (auto web_contents = GetWebContents()) {
return web_contents->IsFullscreen();
}
return false;
}
void CefBrowserHostBase::ExitFullscreen(bool will_cause_resize) {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefBrowserHostBase::ExitFullscreen,
this, will_cause_resize));
return;
}
auto web_contents = GetWebContents();
if (web_contents && web_contents->IsFullscreen()) {
web_contents->ExitFullscreen(will_cause_resize);
}
}
void CefBrowserHostBase::ReplaceMisspelling(const CefString& word) {
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(