Index: Source/wtf/TreeNode.h |
diff --git a/Source/wtf/TreeNode.h b/Source/wtf/TreeNode.h |
index 15c7679bef360329f2e02a4ff30805165a140783..35af98becc8edae96ea0854d46cc38c14a053f00 100644 |
--- a/Source/wtf/TreeNode.h |
+++ b/Source/wtf/TreeNode.h |
@@ -135,6 +135,16 @@ public: |
return child; |
} |
+ void takeChildrenFrom(NodeType* oldParent) |
+ { |
+ ASSERT(oldParent != this); |
+ while (oldParent->hasChildren()) { |
+ NodeType* child = oldParent->firstChild(); |
+ oldParent->removeChild(child); |
+ this->appendChild(child); |
+ } |
+ } |
+ |
private: |
NodeType* m_next; |
NodeType* m_previous; |