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

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

Issue 2810813004: Hide fullscreen rotation jank (Closed)
Patch Set: Re-add feature flag 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 52ddbab340bdc1211418e09c4e8ef738543b3935..4d1afa003b837b5d2cd1a7ea9e7e920998604b46 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2036,6 +2036,11 @@ void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
if (delegate_)
delegate_->EnterFullscreenModeForTab(this, origin);
+ RenderWidgetHostViewBase* rwhvb =
boliu 2017/07/05 17:39:48 chaining these two calls through web contents does
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged();
+
for (auto& observer : observers_)
observer.DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab(), false);
}
@@ -2058,6 +2063,11 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) {
if (delegate_)
delegate_->ExitFullscreenModeForTab(this);
+ RenderWidgetHostViewBase* rwhvb =
+ static_cast<RenderWidgetHostViewBase*>(GetRenderWidgetHostView());
+ if (rwhvb)
+ rwhvb->OnFullscreenStateChanged();
+
// 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