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

Unified Diff: sky/engine/core/css/resolver/StyleResolver.cpp

Issue 767013004: Remove ScopedStyleResolver::treeScopeFor. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/StyleResolver.cpp
diff --git a/sky/engine/core/css/resolver/StyleResolver.cpp b/sky/engine/core/css/resolver/StyleResolver.cpp
index cb9f08acb3248d54340a0bc2a11d50a4c61b2aef..85b8dd412e16f25e8371b6c97675cc5e894c7b9a 100644
--- a/sky/engine/core/css/resolver/StyleResolver.cpp
+++ b/sky/engine/core/css/resolver/StyleResolver.cpp
@@ -166,11 +166,12 @@ void StyleResolver::appendCSSStyleSheet(CSSStyleSheet* cssSheet)
if (cssSheet->mediaQueries() && !m_medium->eval(cssSheet->mediaQueries(), &m_viewportDependentMediaQueryResults))
return;
- TreeScope* treeScope = ScopedStyleResolver::treeScopeFor(document(), cssSheet);
- if (!treeScope)
+ Node* ownerNode = cssSheet->ownerNode();
+ if (!ownerNode)
return;
- ScopedStyleResolver& resolver = treeScope->ensureScopedStyleResolver();
+ TreeScope& treeScope = ownerNode->treeScope();
+ ScopedStyleResolver& resolver = treeScope.ensureScopedStyleResolver();
document().styleEngine()->addScopedStyleResolver(&resolver);
resolver.addRulesFromSheet(cssSheet, *m_medium, this);
}
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698