| Index: Source/core/dom/shadow/ShadowRoot.cpp
|
| ===================================================================
|
| --- Source/core/dom/shadow/ShadowRoot.cpp (revision 187668)
|
| +++ Source/core/dom/shadow/ShadowRoot.cpp (working copy)
|
| @@ -175,13 +175,16 @@
|
|
|
| void ShadowRoot::removedFrom(ContainerNode* insertionPoint)
|
| {
|
| - if (insertionPoint->inDocument() && m_registeredWithParentShadowRoot) {
|
| - ShadowRoot* root = host()->containingShadowRoot();
|
| - if (!root)
|
| - root = insertionPoint->containingShadowRoot();
|
| - if (root)
|
| - root->removeChildShadowRoot();
|
| - m_registeredWithParentShadowRoot = false;
|
| + if (insertionPoint->inDocument()) {
|
| + clearScopedStyleResolver();
|
| + if (m_registeredWithParentShadowRoot) {
|
| + ShadowRoot* root = host()->containingShadowRoot();
|
| + if (!root)
|
| + root = insertionPoint->containingShadowRoot();
|
| + if (root)
|
| + root->removeChildShadowRoot();
|
| + m_registeredWithParentShadowRoot = false;
|
| + }
|
| }
|
|
|
| DocumentFragment::removedFrom(insertionPoint);
|
|
|