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

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

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.h
diff --git a/sky/engine/core/css/resolver/ScopedStyleResolver.h b/sky/engine/core/css/resolver/ScopedStyleResolver.h
index 48c10585e33a2cf0425fd4135894d4e58bf48742..59f0558f6bb900e0bf83a8437aee2eeaeca7fefa 100644
--- a/sky/engine/core/css/resolver/ScopedStyleResolver.h
+++ b/sky/engine/core/css/resolver/ScopedStyleResolver.h
@@ -39,6 +39,7 @@ namespace blink {
class StyleResolver;
class StyleSheetContents;
+class RuleFeatureSet;
// This class selects a RenderStyle for a given element based on a collection of stylesheets.
class ScopedStyleResolver final {
@@ -58,9 +59,11 @@ public:
void collectMatchingAuthorRules(ElementRuleCollector&, bool includeEmptyRules, bool applyAuthorStyles, CascadeScope, CascadeOrder = ignoreCascadeOrder);
void addRulesFromSheet(CSSStyleSheet*, StyleResolver*);
- void collectFeaturesTo(RuleFeatureSet&, HashSet<const StyleSheetContents*>& visitedSharedStyleSheetContents) const;
+
void resetAuthorStyle();
+ const RuleFeatureSet& features() const { return m_features; }
+
private:
explicit ScopedStyleResolver(TreeScope&);
@@ -69,6 +72,8 @@ private:
typedef HashMap<const StringImpl*, RefPtr<StyleRuleKeyframes> > KeyframesRuleMap;
KeyframesRuleMap m_keyframesRuleMap;
+
+ RuleFeatureSet m_features;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698