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

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

Issue 1420653003: Fix an optimisation in ContainerNode::notifyNodeInsertedInternal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assertion Created 5 years, 2 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.cpp
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index d5c733026cb9635ebaf60dca524c3734bd0a58f0..dbf7e0e11b0177c07c3ee030329e388699e1f141 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -836,8 +836,8 @@ void ContainerNode::notifyNodeInsertedInternal(Node& root, NodeVector& postInser
for (Node& node : NodeTraversal::inclusiveDescendantsOf(root)) {
// As an optimization we don't notify leaf nodes when when inserting
- // into detached subtrees.
- if (!inDocument() && !node.isContainerNode())
+ // into detached subtrees that are not in a shadow tree.
+ if (!inDocument() && !isInShadowTree() && !node.isContainerNode())
continue;
if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(this))
postInsertionNotificationTargets.append(&node);

Powered by Google App Engine
This is Rietveld 408576698