Commit 807d457f authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Call ResumeLoadingCreatedWebContents during WillAttach.

window.open on webviews had their widgets left in half creation state
which is unexpected. The Init call is supposed to be called after
the Window/Widget is shown. This was not called due to the
ShouldResumeRequestsForCreatedWindow callback.

The ShouldResumeRequestsForCreatedWindow() is added because
we want to wait until the load is complete on the embedder page so
it has a chance to execute before the guest contents.

Since the RenderWidgetHostImpl::Init was never called it caused an
issue when input handler binding was moved to be performed during the
Init call.

BUG=1132643

Change-Id: If8967d21bdbeb5dd9114eb918af793f88c4fe330
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438477
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Reviewed-by: default avatarKevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812354}
parent 470bb679
......@@ -529,6 +529,8 @@ void GuestViewBase::WillAttach(WebContents* embedder_web_contents,
WillAttachToEmbedder();
web_contents()->ResumeLoadingCreatedWebContents();
owner_web_contents_->AttachInnerWebContents(
base::WrapUnique<WebContents>(web_contents()), outer_contents_frame,
is_full_page_plugin);
......@@ -712,6 +714,9 @@ void GuestViewBase::UpdateTargetURL(WebContents* source, const GURL& url) {
}
bool GuestViewBase::ShouldResumeRequestsForCreatedWindow() {
// Delay so that the embedder page has a chance to call APIs such as
// webRequest in time to be applied to the initial navigation in the new guest
// contents. We resume during WillAttach.
return false;
}
......
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