Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 928673002: Exit HTML Fullscreen when browser fullscreen is active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4f90143f55dfc95e943d980471fbb406fcd2b98c..5701e3392ea08d516ece375ced2a48aee2055052 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1479,6 +1479,17 @@ void WebContentsImpl::ExitFullscreenMode() {
if (delegate_)
delegate_->ExitFullscreenModeForTab(this);
+ // Ensure web contents exit fullscreen state by sending a resize message,
+ // which includes the fullscreen state. This is required for the situation
+ // of the browser moving the view into a fullscreen state "browser fullscreen"
+ // and then the contents entering "tab fullscreen". Exiting the contents
+ // "tab fullscreen" then won't have the side effect of the view resizing,
+ // hence the explicit call here is required.
+ if (RenderWidgetHostView* rwh_view = GetRenderWidgetHostView()) {
+ if (RenderWidgetHost* render_widget_host = rwh_view->GetRenderWidgetHost())
+ render_widget_host->WasResized();
+ }
+
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698