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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 1141283002: Replicate whether a frame is in a document or shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 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 | « components/plugins/renderer/webview_plugin.cc ('k') | content/browser/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index bd6267c88a6304baf6d437487637e8cb2fbd5052..ab65ed6f255d98276b33fc6e70e8d784fe36efcd 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -493,7 +493,8 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
blink::WebView* web_view = blink::WebView::create(NULL);
web_view->settings()->setJavaScriptEnabled(true);
- blink::WebLocalFrame* frame = blink::WebLocalFrame::create(NULL);
+ blink::WebLocalFrame* frame =
+ blink::WebLocalFrame::create(blink::WebTreeScopeType::Document, NULL);
web_view->setMainFrame(frame);
base::StringValue html(ResourceBundle::GetSharedInstance().GetLocalizedString(
@@ -588,6 +589,7 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
// blink::WebFrameClient override:
virtual blink::WebFrame* createChildFrame(
Lei Zhang 2015/05/22 01:59:40 random comment: should these be override?
dcheng 2015/05/22 02:01:00 We generally avoid marking Blink overrides with 'o
blink::WebLocalFrame* parent,
+ blink::WebTreeScopeType scope,
const blink::WebString& name,
blink::WebSandboxFlags sandboxFlags);
virtual void frameDetached(blink::WebFrame* frame);
@@ -707,7 +709,8 @@ void PrepareFrameAndViewForPrint::CopySelection(
blink::WebView* web_view = blink::WebView::create(this);
owns_web_view_ = true;
content::RenderView::ApplyWebPreferences(prefs, web_view);
- web_view->setMainFrame(blink::WebLocalFrame::create(this));
+ web_view->setMainFrame(
+ blink::WebLocalFrame::create(blink::WebTreeScopeType::Document, this));
frame_.Reset(web_view->mainFrame()->toWebLocalFrame());
node_to_print_.reset();
@@ -731,9 +734,10 @@ void PrepareFrameAndViewForPrint::didStopLoading() {
blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
blink::WebLocalFrame* parent,
+ blink::WebTreeScopeType scope,
const blink::WebString& name,
blink::WebSandboxFlags sandboxFlags) {
- blink::WebFrame* frame = blink::WebLocalFrame::create(this);
+ blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
parent->appendChild(frame);
return frame;
}
« no previous file with comments | « components/plugins/renderer/webview_plugin.cc ('k') | content/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698