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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2914013004: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: Style tidy-up 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
« 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 cbd72586e4244e8d7bb4e0cbe291f49933a9830c..7c8c5f64214cb92dad2572b3ca672b69b9fca7ff 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