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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.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
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 0e3c7c0a3ef0572049da9078388caca395df9983..69115f67c7993eb6587c7ebac37eac531d058d1a 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -232,6 +232,11 @@ gfx::Size RenderWidgetHostViewChildFrame::GetVisibleViewportSize() const {
// to be a main frame. This should be cleaned up eventually.
bool is_guest = BrowserPluginGuest::IsGuest(RenderViewHostImpl::From(host_));
if (frame_connector_ && !is_guest) {
+ // An auto-resize set by the top-level frame overrides what would be
+ // reported by embedding RenderWidgetHostViews.
+ if (host_->delegate() && !host_->delegate()->GetAutoResizeSize().IsEmpty())
+ return host_->delegate()->GetAutoResizeSize();
+
RenderWidgetHostView* parent_view =
frame_connector_->GetParentRenderWidgetHostView();
// The parent_view can be null in unit tests when using a TestWebContents.
« no previous file with comments | « no previous file | content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698