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

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: Filter @viewport and @font-face in lazyAppend 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 7bae0c0dc8398d07311c12676ceebc8274c65eb0..155b9eeededc9337d60036842651b818e8198a6b 100644
--- a/Source/core/css/RuleSet.h
+++ b/Source/core/css/RuleSet.h
@@ -31,10 +31,11 @@
namespace WebCore {
enum AddRuleFlags {
- RuleHasNoSpecialState = 0,
- RuleHasDocumentSecurityOrigin = 1,
- RuleCanUseFastCheckSelector = 1 << 1,
- RuleIsInRegionRule = 1 << 2,
+ RuleHasNoSpecialState = 0,
+ RuleHasDocumentSecurityOrigin = 1,
+ RuleCanUseFastCheckSelector = 1 << 1,
+ RuleIsInRegionRule = 1 << 2,
+ RuleSkipsFontFaceAndViewportRule = 1 << 3
eseidel 2013/11/06 01:39:10 Does this mean you can have rules which ignore the
tasak 2013/11/06 05:42:26 I mean, if RuleSkipsFontFaceAndViewportRule is set
};
enum PropertyWhitelistType {
@@ -108,9 +109,10 @@ class RuleSet {
public:
static PassOwnPtr<RuleSet> create() { return adoptPtr(new RuleSet); }
- void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, StyleResolver* = 0, const ContainerNode* = 0);
+ void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, StyleResolver* = 0, const ContainerNode* = 0, bool processFontFaceAndViewportRule = true);
void addStyleRule(StyleRule*, AddRuleFlags);
void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags);
+ void addViewportRule(StyleRuleViewport*);
const RuleFeatureSet& features() const { return m_features; }
@@ -155,7 +157,6 @@ private:
void addToRuleSet(StringImpl* key, PendingRuleMap&, const RuleData&);
void addPageRule(StyleRulePage*);
- void addViewportRule(StyleRuleViewport*);
void addRegionRule(StyleRuleRegion*, bool hasDocumentSecurityOrigin, const ContainerNode* scope);
void addChildRules(const Vector<RefPtr<StyleRuleBase> >&, const MediaQueryEvaluator& medium, StyleResolver*, const ContainerNode* scope, bool hasDocumentSecurityOrigin, AddRuleFlags);

Powered by Google App Engine
This is Rietveld 408576698