mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
mac: Update CSS on fullscreen window exit (fixes #3597)
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user