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

Unified Diff: Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp

Issue 10412037: Merge 116717 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp
===================================================================
--- Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp (revision 118012)
+++ Source/WebCore/editing/ReplaceNodeWithSpanCommand.cpp (working copy)
@@ -56,10 +56,10 @@
parentNode->insertBefore(newNode, nodeToReplace, ec);
ASSERT(!ec);
- RefPtr<Node> nextChild;
- for (Node* child = nodeToReplace->firstChild(); child; child = nextChild.get()) {
- nextChild = child->nextSibling();
- newNode->appendChild(child, ec);
+ NodeVector children;
+ getChildNodes(nodeToReplace, children);
+ for (size_t i = 0; i < children.size(); ++i) {
+ newNode->appendChild(children[i], ec);
ASSERT(!ec);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698