Chromium Code Reviews| 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 ed882eff1d6c293bf29985766f4031d368b948c8..e2e7c50965f7278c35bc4f0d901be2e647109d7f 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -2786,10 +2786,28 @@ void WebContentsImpl::ResizeDueToAutoResize( |
| if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| return; |
| + auto_resize_size_ = new_size; |
| + |
| + // Out-of-process iframe visible viewport sizes usually come from the |
| + // top-level RenderWidgetHostView, but when auto-resize is enabled on the |
| + // top frame then that size is used instead. |
| + for (FrameTreeNode* node : frame_tree_.Nodes()) { |
| + if (node->current_frame_host()->is_local_root()) { |
| + RenderWidgetHostImpl* host = |
| + node->current_frame_host()->GetRenderWidgetHost(); |
| + if (host != render_widget_host) |
| + host->SendScreenRects(); |
|
alexmos
2017/06/02 17:03:18
Just to make sure I understand: how does this end
kenrb
2017/06/02 17:23:27
Good catch, thanks, this is wrong. I had mistakenl
|
| + } |
| + } |
| + |
| if (delegate_) |
| delegate_->ResizeDueToAutoResize(this, new_size); |
| } |
| +gfx::Size WebContentsImpl::GetAutoResizeSize() { |
| + return auto_resize_size_; |
| +} |
| + |
| WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) { |
| if (!delegate_) |
| return NULL; |