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 |