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

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

Issue 848493003: Don't scope check in SelectorChecker. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.h ('k') | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/ScopedStyleResolver.cpp
diff --git a/sky/engine/core/css/resolver/ScopedStyleResolver.cpp b/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
index c76baf035aec4ecf73c7d526834e328fd67634b9..1e8148eba27016db08f1a2f2913a66cf1c1b5358 100644
--- a/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
+++ b/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
@@ -69,9 +69,18 @@ void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& colle
{
RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange();
for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
- MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), &m_scope->rootNode(), m_authorStyleSheets[i], i);
+ MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), m_authorStyleSheets[i], i);
collector.collectMatchingRules(matchRequest, ruleRange, cascadeOrder);
}
}
+void ScopedStyleResolver::collectMatchingHostRules(ElementRuleCollector& collector, CascadeOrder cascadeOrder)
+{
+ RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange();
+ for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
+ MatchRequest matchRequest(&m_authorStyleSheets[i]->contents()->ruleSet(), m_authorStyleSheets[i], i);
+ collector.collectMatchingHostRules(matchRequest, ruleRange, cascadeOrder);
+ }
+}
+
} // namespace blink
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.h ('k') | sky/engine/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698