Commit b5faf62e authored by Henrique Ferreiro's avatar Henrique Ferreiro Committed by Commit Bot

Call DidAttachLocalMainFrame in PrintRenderFrameHelper

Add missing calls to WebView::DidAttachLocalMainFrame() after setting up
the local main frame for a given web view.

Bug: 1053546
Change-Id: If74dcc23b91dd5218c526d48a6b49b84d4b809dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102571
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750305}
parent 6d052ffd
......@@ -701,6 +701,7 @@ void PrintRenderFrameHelper::PrintHeaderAndFooter(
blink::WebWidgetClient web_widget_client;
blink::WebFrameWidget::CreateForMainFrame(&web_widget_client, frame);
web_view->DidAttachLocalMainFrame();
base::Value html(
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
......@@ -938,6 +939,7 @@ void PrepareFrameAndViewForPrint::CopySelection(
blink::WebLocalFrame::CreateMainFrame(web_view, this, nullptr, nullptr);
frame_.Reset(main_frame);
blink::WebFrameWidget::CreateForMainFrame(this, main_frame);
web_view->DidAttachLocalMainFrame();
node_to_print_.Reset();
owns_web_view_ = true;
......
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