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

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

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Remove physical_backing_resized param and other cr feedback Created 3 years, 6 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
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 40429d51814846c69671b3bce27a1af955e1452b..2750c3029b310166e383ac586aa89ed55aa9af6f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2032,6 +2032,11 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
if (delegate_)
delegate_->EnterFullscreenModeForTab(this, origin);
+ RenderWidgetHostViewBase* rwhvb =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged(true);
Khushal 2017/06/20 23:25:05 I think we were earlier using IsFullscreenModeForT
steimel 2017/06/22 01:32:11 Yeah, I think some of the issues with the Fullscre
steimel 2017/06/29 00:38:50 After discussing with Mounir, I'm removing the hac
+
for (auto& observer : observers_)
observer.DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false);
}
@@ -2054,6 +2059,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) {
if (delegate_)
delegate_->ExitFullscreenModeForTab(this);
+ RenderWidgetHostViewBase* rwhvb =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged(false);
+
// The fullscreen state is communicated to the renderer through a resize
// message. If the change in fullscreen state doesn't cause a view resize
// then we must ensure web contents exit the fullscreen state by explicitly

Powered by Google App Engine
This is Rietveld 408576698