Commit 931d158f authored by kenrb's avatar kenrb Committed by Commit bot

Set WebViewImpl's size in OOPIF processes.

In an OOPIF process with a remote main frame, currently the size of
the WebViewImpl is not set, because it is not relevant when there is
no main frame to render. However, the VisualViewport size is required
so OOPIF resizes set it appropriately.

This has caused a problem during printing because it saves and then
restores the WebViewImpl size, which unfortunately also wipes out the
VisualViewport size. This CL sets the WebViewImpl size along with
the VisualViewport in order to keep them consistent.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
BUG=705867

Review-Url: https://codereview.chromium.org/2801143002
Cr-Commit-Position: refs/heads/master@{#462927}
parent 1cdf325a
......@@ -203,9 +203,11 @@ void WebFrameWidgetImpl::sendResizeEventAndRepaint() {
void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) {
// TODO(alexmos, kenrb): resizing behavior such as this should be changed
// to use Page messages. https://crbug.com/599688.
page()->visualViewport().setSize(newSize);
page()->visualViewport().clampToBoundaries();
// to use Page messages. This uses the visual viewport size to set size on
// both the WebViewImpl size and the Page's VisualViewport. If there are
// multiple OOPIFs on a page, this will currently be set redundantly by
// each of them. See https://crbug.com/599688.
view()->resize(newSize);
view()->didUpdateFullscreenSize();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment