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

Unified Diff: sky/engine/core/dom/ContainerNode.cpp

Issue 758623002: Remove didNotifySubtreeInsertionsToDocument. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/ContainerNode.h ('k') | sky/engine/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/ContainerNode.cpp
diff --git a/sky/engine/core/dom/ContainerNode.cpp b/sky/engine/core/dom/ContainerNode.cpp
index db5be4a3dc6a4b3f745b1e3ed57bd8495eac9306..d8d50024773a751ab3427efa68052e6868761c3e 100644
--- a/sky/engine/core/dom/ContainerNode.cpp
+++ b/sky/engine/core/dom/ContainerNode.cpp
@@ -601,19 +601,12 @@ void ContainerNode::notifyNodeInserted(Node& root, ChildrenChangeSource source)
RefPtr<Node> protect(this);
RefPtr<Node> protectNode(root);
- NodeVector postInsertionNotificationTargets;
- notifyNodeInsertedInternal(root, postInsertionNotificationTargets);
+ notifyNodeInsertedInternal(root);
childrenChanged(ChildrenChange::forInsertion(root, source));
-
- for (size_t i = 0; i < postInsertionNotificationTargets.size(); ++i) {
- Node* targetNode = postInsertionNotificationTargets[i].get();
- if (targetNode->inDocument())
- targetNode->didNotifySubtreeInsertionsToDocument();
- }
}
-void ContainerNode::notifyNodeInsertedInternal(Node& root, NodeVector& postInsertionNotificationTargets)
+void ContainerNode::notifyNodeInsertedInternal(Node& root)
{
EventDispatchForbiddenScope assertNoEventDispatch;
ScriptForbiddenScope forbidScript;
@@ -623,10 +616,9 @@ void ContainerNode::notifyNodeInsertedInternal(Node& root, NodeVector& postInser
// into detached subtrees.
if (!inDocument() && !node->isContainerNode())
continue;
- if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node->insertedInto(this))
- postInsertionNotificationTargets.append(node);
+ node->insertedInto(this);
for (ShadowRoot* shadowRoot = node->youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot())
- notifyNodeInsertedInternal(*shadowRoot, postInsertionNotificationTargets);
+ notifyNodeInsertedInternal(*shadowRoot);
}
}
« no previous file with comments | « sky/engine/core/dom/ContainerNode.h ('k') | sky/engine/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698