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

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

Issue 10536125: Merge 119870 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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
Index: Source/WebCore/editing/CompositeEditCommand.cpp
===================================================================
--- Source/WebCore/editing/CompositeEditCommand.cpp (revision 120113)
+++ Source/WebCore/editing/CompositeEditCommand.cpp (working copy)
@@ -403,6 +403,20 @@
prune(parent.release());
}
+void CompositeEditCommand::moveRemainingSiblingsToNewParent(Node* node, Node* pastLastNodeToMove, PassRefPtr<Element> prpNewParent)
+{
+ NodeVector nodesToRemove;
+ RefPtr<Element> newParent = prpNewParent;
+
+ for (; node && node != pastLastNodeToMove; node = node->nextSibling())
+ nodesToRemove.append(node);
+
+ for (unsigned i = 0; i < nodesToRemove.size(); i++) {
+ removeNode(nodesToRemove[i]);
+ appendNode(nodesToRemove[i], newParent);
+ }
+}
+
HTMLElement* CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes(PassRefPtr<HTMLElement> node)
{
// It would also be possible to implement all of ReplaceNodeWithSpanCommand
« no previous file with comments | « Source/WebCore/editing/CompositeEditCommand.h ('k') | Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698