Index: Source/core/css/ElementRuleCollector.cpp |
diff --git a/Source/core/css/ElementRuleCollector.cpp b/Source/core/css/ElementRuleCollector.cpp |
index 5ccfc77f50439c5ac436b6bd0d9d8b06f8dc850c..2384ae2dc45fb22bdf890b5aa02db480ce1bf87e 100644 |
--- a/Source/core/css/ElementRuleCollector.cpp |
+++ b/Source/core/css/ElementRuleCollector.cpp |
@@ -100,14 +100,14 @@ void ElementRuleCollector::addElementStyleProperties(const StylePropertySet* pro |
static bool rulesApplicableInCurrentTreeScope(const Element* element, const ContainerNode* scopingNode, SelectorChecker::BehaviorAtBoundary behaviorAtBoundary, bool elementApplyAuthorStyles) |
{ |
- TreeScope& treeScope = element->treeScope(); |
+ NonNullPtr<TreeScope> treeScope = element->treeScope(); |
// [skipped, because already checked] a) it's a UA rule |
// b) element is allowed to apply author rules |
if (elementApplyAuthorStyles) |
return true; |
// c) the rules comes from a scoped style sheet within the same tree scope |
- if (!scopingNode || &treeScope == &scopingNode->treeScope()) |
+ if (!scopingNode || treeScope == scopingNode->treeScope()) |
return true; |
// d) the rules comes from a scoped style sheet within an active shadow root whose host is the given element |
if (element->isInShadowTree() && (behaviorAtBoundary & SelectorChecker::ScopeIsShadowHost) && scopingNode == element->containingShadowRoot()->host()) |