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

Unified Diff: Source/core/dom/Document.cpp

Issue 252713004: Make default for deep parameter in importNode false (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add use counter and rebase test results Created 6 years, 8 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 | « Source/core/dom/Document.h ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 56203732bc1f5132cde33a1d48691e506bdb9391..503c95e2b41e134757a79681a3a987c09b02c15f 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -914,6 +914,13 @@ bool Document::importContainerNodeChildren(ContainerNode* oldContainerNode, Pass
return true;
}
+PassRefPtr<Node> Document::importNode(Node* importedNode, ExceptionState& ec)
+{
+ UseCounter::count(this, UseCounter::DocumentImportNodeOptionalArgument);
Inactive 2014/04/30 15:47:44 UseCounter::countDeprecation()
+ addConsoleMessage(JSMessageSource, WarningMessageLevel, "The behavior of importNode() with no boolean argument is about to change from doing a deep clone to doing a shallow clone. Make sure to pass an explicit boolean argument to keep your current behavior.");
Inactive 2014/04/30 15:47:44 We usually add the warning message to UseCounter.c
+ return importNode(importedNode, true, ec);
+}
+
PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionState& exceptionState)
{
if (!importedNode) {
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698