| Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
|
| index 44e1ea74218499dabb8e715c3678410fa3cc8817..91db0389652ef8b4fedd38d1aaec5242e303ec90 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
|
| @@ -512,15 +512,15 @@ void StyleResolver::matchScopedRules(const Element& element, ElementRuleCollecto
|
| bool matchElementScopeDone = !elementScopeResolver && !element.inlineStyle();
|
|
|
| for (auto it = m_treeBoundaryCrossingScopes.rbegin(); it != m_treeBoundaryCrossingScopes.rend(); ++it) {
|
| - const TreeScope& scope = (*it)->treeScope();
|
| + const TreeScope& scope = (*it)->rootTreeScope();
|
| ScopedStyleResolver* resolver = scope.scopedStyleResolver();
|
| ASSERT(resolver);
|
|
|
| - bool isInnerTreeScope = element.treeScope().isInclusiveAncestorOf(scope);
|
| + bool isInnerTreeScope = element.rootTreeScope().isInclusiveAncestorOf(scope);
|
| if (!shouldCheckScope(element, **it, isInnerTreeScope))
|
| continue;
|
|
|
| - if (!matchElementScopeDone && scope.isInclusiveAncestorOf(element.treeScope())) {
|
| + if (!matchElementScopeDone && scope.isInclusiveAncestorOf(element.rootTreeScope())) {
|
|
|
| matchElementScopeDone = true;
|
|
|
| @@ -660,7 +660,7 @@ void StyleResolver::collectTreeBoundaryCrossingRules(const Element& element, Ele
|
| for (const auto& scopingNode : m_treeBoundaryCrossingScopes) {
|
| // Skip rule collection for element when tree boundary crossing rules of scopingNode's
|
| // scope can never apply to it.
|
| - bool isInnerTreeScope = element.treeScope().isInclusiveAncestorOf(scopingNode->treeScope());
|
| + bool isInnerTreeScope = element.rootTreeScope().isInclusiveAncestorOf(scopingNode->rootTreeScope());
|
| if (!shouldCheckScope(element, *scopingNode, isInnerTreeScope))
|
| continue;
|
|
|
|
|