Index: Source/core/dom/shadow/ElementShadow.cpp |
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp |
index 807aeabab367dea09b26da69ddc729063c0ecc0d..2e988ee0ab78aeedb2595db42ec8879d0a025bdc 100644 |
--- a/Source/core/dom/shadow/ElementShadow.cpp |
+++ b/Source/core/dom/shadow/ElementShadow.cpp |
@@ -72,21 +72,27 @@ void ElementShadow::removeAllShadowRoots() |
m_distributor.invalidateDistribution(shadowHost); |
} |
-void ElementShadow::attach() |
+void ElementShadow::attach(const Node::AttachContext& context) |
{ |
ContentDistributor::ensureDistribution(host()); |
+ Node::AttachContext childrenContext(context); |
+ childrenContext.resolvedStyle = 0; |
+ |
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) { |
if (!root->attached()) |
- root->attach(); |
+ root->attach(childrenContext); |
} |
} |
-void ElementShadow::detach() |
+void ElementShadow::detach(const Node::AttachContext& context) |
{ |
+ Node::AttachContext childrenContext(context); |
+ childrenContext.resolvedStyle = 0; |
+ |
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) { |
if (root->attached()) |
- root->detach(); |
+ root->detach(childrenContext); |
} |
} |