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

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

Issue 837883002: Store features in the ScopedStyleResoolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Simpler even. 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
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 6769ef6e78a3e8863e60fc3df71b9be247cef1ee..8c51e2cd7d19127a52bdfba272a8a8bcdeecf777 100644
--- a/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
+++ b/sky/engine/core/css/resolver/ScopedStyleResolver.cpp
@@ -54,21 +54,15 @@ void ScopedStyleResolver::addRulesFromSheet(CSSStyleSheet* cssSheet, StyleResolv
const RuleSet& ruleSet = sheet->ensureRuleSet(addRuleFlags);
resolver->addMediaQueryResults(ruleSet.viewportDependentMediaQueryResults());
resolver->processScopedRules(ruleSet, cssSheet, index, treeScope().rootNode());
-}
-void ScopedStyleResolver::collectFeaturesTo(RuleFeatureSet& features, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const
-{
- for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
- StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
- if (visitedSharedStyleSheetContents.add(contents).isNewEntry)
- features.add(contents->ruleSet().features());
- }
+ m_features.add(ruleSet.features());
}
void ScopedStyleResolver::resetAuthorStyle()
{
m_authorStyleSheets.clear();
m_keyframesRuleMap.clear();
+ m_features.clear();
}
const StyleRuleKeyframes* ScopedStyleResolver::keyframeStylesForAnimation(const StringImpl* animationName)

Powered by Google App Engine
This is Rietveld 408576698