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

Unified Diff: Source/core/css/RuleSet.h

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 1 month 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: Source/core/css/RuleSet.h
diff --git a/Source/core/css/RuleSet.h b/Source/core/css/RuleSet.h
index 6ed942e48c7996eceab91eb0fe7af123f580135a..07dc6109615f30c87aa83241d08ffc569786dff0 100644
--- a/Source/core/css/RuleSet.h
+++ b/Source/core/css/RuleSet.h
@@ -38,6 +38,7 @@ enum AddRuleFlags {
RuleHasDocumentSecurityOrigin = 1,
RuleCanUseFastCheckSelector = 1 << 1,
RuleIsInRegionRule = 1 << 2,
+ ViewportRuleIsProcessed = 1 << 3
};
enum PropertyWhitelistType {
@@ -122,9 +123,10 @@ class RuleSet {
public:
static PassOwnPtr<RuleSet> create() { return adoptPtr(new RuleSet); }
- void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, bool hasDocumentSecurityOrigin = false);
+ void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, AddRuleFlags = RuleHasNoSpecialState);
void addStyleRule(StyleRule*, AddRuleFlags);
void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags);
+ void addViewportRule(StyleRuleViewport*);
const RuleFeatureSet& features() const { return m_features; }
@@ -175,13 +177,12 @@ private:
void addToRuleSet(StringImpl* key, PendingRuleMap&, const RuleData&);
void addPageRule(StyleRulePage*);
- void addViewportRule(StyleRuleViewport*);
void addFontFaceRule(StyleRuleFontFace*);
void addKeyframesRule(StyleRuleKeyframes*);
void addHostRule(StyleRuleHost*);
void addRegionRule(StyleRuleRegion*, bool hasDocumentSecurityOrigin);
- void addChildRules(const Vector<RefPtr<StyleRuleBase> >&, const MediaQueryEvaluator& medium, bool hasDocumentSecurityOrigin, AddRuleFlags);
+ void addChildRules(const Vector<RefPtr<StyleRuleBase> >&, const MediaQueryEvaluator& medium, AddRuleFlags);
bool findBestRuleSetAndAdd(const CSSSelector*, RuleData&);
void compactRules();

Powered by Google App Engine
This is Rietveld 408576698