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

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

Issue 1204933006: Elements moved from a shadow root to a detached tree should clear their IsInShadowTree Flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 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
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index ce718da1e55f91bd9880f00fe5f64e59af609d9b..4bc8cc410f560a6f2e5f995800a190aa22c1db0d 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -850,9 +850,9 @@ void ContainerNode::notifyNodeRemoved(Node& root)
for (Node& node : NodeTraversal::inclusiveDescendantsOf(root)) {
// As an optimization we skip notifying Text nodes and other leaf nodes
- // of removal when they're not in the Document tree since the virtual
+ // of removal when they're not in the Document tree and not in a shadow root since the virtual
// call to removedFrom is not needed.
- if (!node.inDocument() && !node.isContainerNode())
+ if (!node.isContainerNode() && !node.isInTreeScope())
continue;
node.removedFrom(this);
for (ShadowRoot* shadowRoot = node.youngestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot())

Powered by Google App Engine
This is Rietveld 408576698