| Index: sky/engine/core/dom/TreeScopeAdopter.cpp
|
| diff --git a/sky/engine/core/dom/TreeScopeAdopter.cpp b/sky/engine/core/dom/TreeScopeAdopter.cpp
|
| index f378ee517a7c8798c2c4e291c75fc5fc5d44b1b5..441eb59ce8209375f9f2e09c86813f6c092dfe3b 100644
|
| --- a/sky/engine/core/dom/TreeScopeAdopter.cpp
|
| +++ b/sky/engine/core/dom/TreeScopeAdopter.cpp
|
| @@ -37,9 +37,7 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const
|
| {
|
| ASSERT(needsScopeChange());
|
|
|
| -#if !ENABLE(OILPAN)
|
| oldScope().guardRef();
|
| -#endif
|
|
|
| Document& oldDocument = oldScope().document();
|
| Document& newDocument = newScope().document();
|
| @@ -54,16 +52,14 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const
|
| if (!node->isElementNode())
|
| continue;
|
|
|
| - for (ShadowRoot* shadow = node->youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot()) {
|
| + if (ShadowRoot* shadow = node->shadowRoot()) {
|
| shadow->setParentTreeScope(newScope());
|
| if (willMoveToNewDocument)
|
| moveTreeToNewDocument(*shadow, oldDocument, newDocument);
|
| }
|
| }
|
|
|
| -#if !ENABLE(OILPAN)
|
| oldScope().guardDeref();
|
| -#endif
|
| }
|
|
|
| void TreeScopeAdopter::moveTreeToNewDocument(Node& root, Document& oldDocument, Document& newDocument) const
|
| @@ -72,7 +68,7 @@ void TreeScopeAdopter::moveTreeToNewDocument(Node& root, Document& oldDocument,
|
| for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) {
|
| moveNodeToNewDocument(*node, oldDocument, newDocument);
|
|
|
| - for (ShadowRoot* shadow = node->youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot())
|
| + if (ShadowRoot* shadow = node->shadowRoot())
|
| moveTreeToNewDocument(*shadow, oldDocument, newDocument);
|
| }
|
| }
|
|
|