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

Unified Diff: Source/wtf/TreeNode.h

Issue 238923009: HTML Imports: No more BlockingDocumentCreation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed the build breakage Created 6 years, 8 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/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;

Powered by Google App Engine
This is Rietveld 408576698