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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParser.h

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: s/->/. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSParser_h 5 #ifndef CSSParser_h
6 #define CSSParser_h 6 #define CSSParser_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/css/CSSValue.h" 10 #include "core/css/CSSValue.h"
(...skipping 13 matching lines...) Expand all
24 class StyleRuleBase; 24 class StyleRuleBase;
25 class StyleRuleKeyframe; 25 class StyleRuleKeyframe;
26 class StyleSheetContents; 26 class StyleSheetContents;
27 27
28 // This class serves as the public API for the css/parser subsystem 28 // This class serves as the public API for the css/parser subsystem
29 class CORE_EXPORT CSSParser { 29 class CORE_EXPORT CSSParser {
30 STATIC_ONLY(CSSParser); 30 STATIC_ONLY(CSSParser);
31 public: 31 public:
32 // As well as regular rules, allows @import and @namespace but not @charset 32 // As well as regular rules, allows @import and @namespace but not @charset
33 static StyleRuleBase* parseRule(const CSSParserContext&, StyleSheetContents* , const String&); 33 static StyleRuleBase* parseRule(const CSSParserContext&, StyleSheetContents* , const String&);
34 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&); 34 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&, bool deferPropertyParsing = false);
35 static CSSSelectorList parseSelector(const CSSParserContext&, StyleSheetCont ents*, const String&); 35 static CSSSelectorList parseSelector(const CSSParserContext&, StyleSheetCont ents*, const String&);
36 static CSSSelectorList parsePageSelector(const CSSParserContext&, StyleSheet Contents*, const String&); 36 static CSSSelectorList parsePageSelector(const CSSParserContext&, StyleSheet Contents*, const String&);
37 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&); 37 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&);
38 // Returns whether anything was changed. 38 // Returns whether anything was changed.
39 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, StyleSheetContents*); 39 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, StyleSheetContents*);
40 40
41 static bool parseValueForCustomProperty(MutableStylePropertySet*, const Atom icString& propertyName, const String& value, bool important, StyleSheetContents* ); 41 static bool parseValueForCustomProperty(MutableStylePropertySet*, const Atom icString& propertyName, const String& value, bool important, StyleSheetContents* );
42 static ImmutableStylePropertySet* parseCustomPropertySet(CSSParserTokenRange ); 42 static ImmutableStylePropertySet* parseCustomPropertySet(CSSParserTokenRange );
43 43
44 // This is for non-shorthands only 44 // This is for non-shorthands only
(...skipping 16 matching lines...) Expand all
61 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&); 61 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&);
62 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&); 62 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&);
63 63
64 private: 64 private:
65 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&); 65 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&);
66 }; 66 };
67 67
68 } // namespace blink 68 } // namespace blink
69 69
70 #endif // CSSParser_h 70 #endif // CSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698