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); |