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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2928643003: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 854c10c2fac3e86a50d944b7f29a8d768c3b19ef..e7f5f36de829173736c450b405e6cc245fb01a2f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -937,6 +937,10 @@ void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) {
Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size));
if (!new_size.IsEmpty())
GetWidget()->GetView()->SetSize(new_size);
+ // This clears the cached value in the WebContents, so that OOPIFs will
+ // stop using it.
+ if (GetWidget()->delegate())
+ GetWidget()->delegate()->ResetAutoResizeSize();
}
void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation(

Powered by Google App Engine
This is Rietveld 408576698