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

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

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: CL for src perf tryjob to run page_cycler_v2.typical_25 benchmark on all-android platform(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"
11 #include "core/css/StylePropertySet.h"
11 #include "core/css/parser/CSSParserMode.h" 12 #include "core/css/parser/CSSParserMode.h"
12 #include "platform/graphics/Color.h" 13 #include "platform/graphics/Color.h"
14 #include "wtf/Functional.h"
Charlie Harrison 2016/09/26 22:16:59 These includes can be removed
Charlie Harrison 2016/09/27 13:22:01 Done.
13 #include <memory> 15 #include <memory>
14 16
15 namespace blink { 17 namespace blink {
16 18
17 class CSSParserObserver; 19 class CSSParserObserver;
18 class CSSParserTokenRange; 20 class CSSParserTokenRange;
19 class CSSSelectorList; 21 class CSSSelectorList;
20 class Element; 22 class Element;
21 class ImmutableStylePropertySet; 23 class ImmutableStylePropertySet;
22 class MutableStylePropertySet; 24 class MutableStylePropertySet;
23 class StyleColor; 25 class StyleColor;
24 class StyleRuleBase; 26 class StyleRuleBase;
25 class StyleRuleKeyframe; 27 class StyleRuleKeyframe;
26 class StyleSheetContents; 28 class StyleSheetContents;
27 29
28 // This class serves as the public API for the css/parser subsystem 30 // This class serves as the public API for the css/parser subsystem
29 class CORE_EXPORT CSSParser { 31 class CORE_EXPORT CSSParser {
30 STATIC_ONLY(CSSParser); 32 STATIC_ONLY(CSSParser);
31 public: 33 public:
32 // As well as regular rules, allows @import and @namespace but not @charset 34 // As well as regular rules, allows @import and @namespace but not @charset
33 static StyleRuleBase* parseRule(const CSSParserContext&, StyleSheetContents* , const String&); 35 static StyleRuleBase* parseRule(const CSSParserContext&, StyleSheetContents* , const String&);
34 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&); 36 static void parseSheet(const CSSParserContext&, StyleSheetContents*, const S tring&, bool deferPropertyParsing = false);
35 static CSSSelectorList parseSelector(const CSSParserContext&, StyleSheetCont ents*, const String&); 37 static CSSSelectorList parseSelector(const CSSParserContext&, StyleSheetCont ents*, const String&);
36 static CSSSelectorList parsePageSelector(const CSSParserContext&, StyleSheet Contents*, const String&); 38 static CSSSelectorList parsePageSelector(const CSSParserContext&, StyleSheet Contents*, const String&);
37 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&); 39 static bool parseDeclarationList(const CSSParserContext&, MutableStyleProper tySet*, const String&);
38 // Returns whether anything was changed. 40 // Returns whether anything was changed.
39 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, StyleSheetContents*); 41 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, StyleSheetContents*);
40 42
41 static bool parseValueForCustomProperty(MutableStylePropertySet*, const Atom icString& propertyName, const String& value, bool important, StyleSheetContents* ); 43 static bool parseValueForCustomProperty(MutableStylePropertySet*, const Atom icString& propertyName, const String& value, bool important, StyleSheetContents* );
42 static ImmutableStylePropertySet* parseCustomPropertySet(CSSParserTokenRange ); 44 static ImmutableStylePropertySet* parseCustomPropertySet(CSSParserTokenRange );
43 45
44 // This is for non-shorthands only 46 // This is for non-shorthands only
(...skipping 16 matching lines...) Expand all
61 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&); 63 static void parseSheetForInspector(const CSSParserContext&, StyleSheetConten ts*, const String&, CSSParserObserver&);
62 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&); 64 static void parseDeclarationListForInspector(const CSSParserContext&, const String&, CSSParserObserver&);
63 65
64 private: 66 private:
65 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&); 67 static bool parseValue(MutableStylePropertySet*, CSSPropertyID unresolvedPro perty, const String&, bool important, const CSSParserContext&);
66 }; 68 };
67 69
68 } // namespace blink 70 } // namespace blink
69 71
70 #endif // CSSParser_h 72 #endif // CSSParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698