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

Unified Diff: third_party/WebKit/Source/core/dom/ContainerNode.h

Issue 2317573003: Introduce ContainerNode::insertNodeVector() to share code in insertBefore(), appendChild(), and rep… (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/Source/core/dom/ContainerNode.h
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.h b/third_party/WebKit/Source/core/dom/ContainerNode.h
index 4bdf9f285d06f4d042955ce0a0ac08b9d9d68b3f..faa36d2aa1ee05ecc43dadfcd63cba13b497df7f 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.h
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.h
@@ -242,7 +242,10 @@ private:
NodeListsNodeData& ensureNodeLists();
void removeBetween(Node* previousChild, Node* nextChild, Node& oldChild);
- void insertBeforeCommon(Node& nextChild, Node& oldChild);
+ void insertNodeVector(const NodeVector&, Node* next, bool (ContainerNode::*mutator)(Node& child, Node* next));
+ bool insertBeforeCommonWithAdoption(Node& newChild, Node* nextChild);
+ bool appendChildCommonWithAdoption(Node& newChild, Node* ignored);
+ void insertBeforeCommon(Node& nextChild, Node& newChild);
void appendChildCommon(Node& child);
void updateTreeAfterInsertion(Node& child);
void willRemoveChildren();

Powered by Google App Engine
This is Rietveld 408576698