| Index: Source/core/dom/shadow/ElementShadow.cpp
|
| diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
|
| index ec30bd6535872d8ca0034ea802178af075185b1e..0942a47a6b8c2db7db4ebded9d878c16c298c3f3 100644
|
| --- a/Source/core/dom/shadow/ElementShadow.cpp
|
| +++ b/Source/core/dom/shadow/ElementShadow.cpp
|
| @@ -78,21 +78,27 @@ void ElementShadow::removeAllShadowRoots()
|
| m_distributor.invalidateDistribution(shadowHost);
|
| }
|
|
|
| -void ElementShadow::attach()
|
| +void ElementShadow::attach(const Node::AttachContext& context)
|
| {
|
| ContentDistributor::ensureDistribution(youngestShadowRoot());
|
|
|
| + 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);
|
| }
|
| }
|
|
|
|
|