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

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

Issue 2914013004: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: alexmos review comments addressed Created 3 years, 7 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 df1962ab320d770de1b74f63d194e66a63cc5fc0..c8a1839248a9c3f5958b01dc65e8d74faa5d9659 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -933,6 +933,12 @@ 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()->ResizeDueToAutoResize(GetWidget(),
+ gfx::Size(0, 0));
alexmos 2017/06/02 17:03:18 optional: can just use "gfx::Size()" here
kenrb 2017/06/02 17:23:27 Yes, but I had to remove this call anyway because
+ }
}
void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation(

Powered by Google App Engine
This is Rietveld 408576698