diff options
-rw-r--r-- | chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp | 4 | ||||
-rw-r--r-- | chromium/third_party/WebKit/Source/core/dom/Element.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp index e3b10a8e7aa..4203d6edd78 100644 --- a/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp +++ b/chromium/third_party/WebKit/Source/core/dom/ContainerNode.cpp @@ -799,8 +799,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); diff --git a/chromium/third_party/WebKit/Source/core/dom/Element.h b/chromium/third_party/WebKit/Source/core/dom/Element.h index 240253a03ec..5f297b5b423 100644 --- a/chromium/third_party/WebKit/Source/core/dom/Element.h +++ b/chromium/third_party/WebKit/Source/core/dom/Element.h @@ -775,7 +775,7 @@ inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse { ASSERT(!childNeedsStyleInvalidation()); ASSERT(!needsStyleInvalidation()); - ASSERT(insertionPoint->inDocument() || isContainerNode()); + ASSERT(insertionPoint->inDocument() || insertionPoint->isInShadowTree() || isContainerNode()); if (insertionPoint->inDocument()) setFlag(InDocumentFlag); if (parentOrShadowHostNode()->isInShadowTree()) |