Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5940ae92c01354bcc0655cc32c28950f923f917c..e32c6e9fbfe854077b111d8040d673cecba374b1 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)->containingTreeScope();
ScopedStyleResolver* resolver = scope.scopedStyleResolver();
ASSERT(resolver);
- bool isInnerTreeScope = element.treeScope().isInclusiveAncestorOf(scope);
+ bool isInnerTreeScope = element.containingTreeScope().isInclusiveAncestorOf(scope);
if (!shouldCheckScope(element, **it, isInnerTreeScope))
continue;
- if (!matchElementScopeDone && scope.isInclusiveAncestorOf(element.treeScope())) {
+ if (!matchElementScopeDone && scope.isInclusiveAncestorOf(element.containingTreeScope())) {
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.containingTreeScope().isInclusiveAncestorOf(scopingNode->containingTreeScope());
if (!shouldCheckScope(element, *scopingNode, isInnerTreeScope))
continue;
« no previous file with comments | « third_party/WebKit/Source/core/css/ElementRuleCollector.cpp ('k') | third_party/WebKit/Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698