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

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

Issue 22880029: Make AttachBehavior a required argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/Node.h ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index 2d6894f8f5116a35b8ffa25dc9fb3a82aabd86f4..7409a9724b7c72464157566349258c4349b708ce 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -755,7 +755,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
// (or just delete the stuff in between)
if ((action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) && leftContents)
- fragment->appendChild(leftContents, es);
+ fragment->appendChild(leftContents, es, DeprecatedAttachNow);
if (processStart) {
NodeVector nodes;
@@ -765,7 +765,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception
}
if ((action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) && rightContents)
- fragment->appendChild(rightContents, es);
+ fragment->appendChild(rightContents, es, DeprecatedAttachNow);
return fragment.release();
}
@@ -796,7 +796,7 @@ PassRefPtr<Node> Range::processContentsBetweenOffsets(ActionType action, PassRef
deleteCharacterData(c, startOffset, endOffset, es);
if (fragment) {
result = fragment;
- result->appendChild(c.release(), es);
+ result->appendChild(c.release(), es, DeprecatedAttachNow);
} else
result = c.release();
}
@@ -810,7 +810,7 @@ PassRefPtr<Node> Range::processContentsBetweenOffsets(ActionType action, PassRef
c->setData(c->data().substring(startOffset, endOffset - startOffset));
if (fragment) {
result = fragment;
- result->appendChild(c.release(), es);
+ result->appendChild(c.release(), es, DeprecatedAttachNow);
} else
result = c.release();
}
@@ -882,7 +882,7 @@ PassRefPtr<Node> Range::processAncestorsAndTheirSiblings(ActionType action, Node
RefPtr<Node> ancestor = *it;
if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) {
if (RefPtr<Node> clonedAncestor = ancestor->cloneNode(false)) { // Might have been removed already during mutation event.
- clonedAncestor->appendChild(clonedContainer, es);
+ clonedAncestor->appendChild(clonedContainer, es, DeprecatedAttachNow);
clonedContainer = clonedAncestor;
}
}
@@ -905,15 +905,15 @@ PassRefPtr<Node> Range::processAncestorsAndTheirSiblings(ActionType action, Node
break;
case EXTRACT_CONTENTS: // will remove child from ancestor
if (direction == ProcessContentsForward)
- clonedContainer->appendChild(child, es);
+ clonedContainer->appendChild(child, es, DeprecatedAttachNow);
else
- clonedContainer->insertBefore(child, clonedContainer->firstChild(), es);
+ clonedContainer->insertBefore(child, clonedContainer->firstChild(), es, DeprecatedAttachNow);
break;
case CLONE_CONTENTS:
if (direction == ProcessContentsForward)
- clonedContainer->appendChild(child->cloneNode(true), es);
+ clonedContainer->appendChild(child->cloneNode(true), es, DeprecatedAttachNow);
else
- clonedContainer->insertBefore(child->cloneNode(true), clonedContainer->firstChild(), es);
+ clonedContainer->insertBefore(child->cloneNode(true), clonedContainer->firstChild(), es, DeprecatedAttachNow);
break;
}
}
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698