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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 16629006: Revert 151996 "Avoid N^2 walk placing renderers when building th..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Update to head Created 7 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
« no previous file with comments | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 28111957f656b5c3399a7dcd57f3f4ab400b20f1..c4e6a4a1fd78631c26ca0be7b37491e327aaf48e 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -52,9 +52,7 @@ typedef pair<NodeCallback, RefPtr<Node> > CallbackInfo;
typedef Vector<CallbackInfo> NodeCallbackQueue;
static NodeCallbackQueue* s_postAttachCallbackQueue;
-static NodeCallbackQueue* s_insertionCallbackQueue;
-static size_t s_insertionDepth;
static size_t s_attachDepth;
ChildNodesLazySnapshot* ChildNodesLazySnapshot::latestSnapshot = 0;
@@ -687,29 +685,6 @@ void ContainerNode::resumePostAttachCallbacks()
--s_attachDepth;
}
-void ContainerNode::suspendInsertionCallbacks()
-{
- ++s_insertionDepth;
-}
-
-void ContainerNode::resumeInsertionCallbacks()
-{
- if (s_insertionDepth == 1 && s_insertionCallbackQueue)
- dispatchInsertionCallbacks();
- --s_insertionDepth;
-}
-
-void ContainerNode::queueInsertionCallback(NodeCallback callback, Node* node)
-{
- if (!s_insertionDepth) {
- (*callback)(node);
- return;
- }
- if (!s_insertionCallbackQueue)
- s_insertionCallbackQueue = new NodeCallbackQueue;
- s_insertionCallbackQueue->append(CallbackInfo(callback, node));
-}
-
void ContainerNode::queuePostAttachCallback(NodeCallback callback, Node* node)
{
if (!s_postAttachCallbackQueue)
@@ -1043,15 +1018,6 @@ static void dispatchChildRemovalEvents(Node* child)
}
}
-void ContainerNode::dispatchInsertionCallbacks()
-{
- for (size_t i = s_insertionCallbackQueue->size(); i; --i) {
- const CallbackInfo& info = (*s_insertionCallbackQueue)[i - 1];
- info.first(info.second.get());
- }
- s_insertionCallbackQueue->clear();
-}
-
static void updateTreeAfterInsertion(ContainerNode* parent, Node* child, AttachBehavior attachBehavior)
{
ASSERT(parent->refCount());
« no previous file with comments | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698