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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 CSSParserImpl_h 5 #ifndef CSSParserImpl_h
6 #define CSSParserImpl_h 6 #define CSSParserImpl_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/css/CSSProperty.h" 9 #include "core/css/CSSProperty.h"
10 #include "core/css/CSSPropertySourceData.h" 10 #include "core/css/CSSPropertySourceData.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 AllowCharsetRules, 49 AllowCharsetRules,
50 AllowImportRules, 50 AllowImportRules,
51 AllowNamespaceRules, 51 AllowNamespaceRules,
52 RegularRules, 52 RegularRules,
53 KeyframeRules, 53 KeyframeRules,
54 NoRules, // For parsing at-rules inside declaration lists 54 NoRules, // For parsing at-rules inside declaration lists
55 }; 55 };
56 56
57 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, const CSSParserContext&); 57 static bool parseValue(MutableStylePropertySet*, CSSPropertyID, const String &, bool important, const CSSParserContext&);
58 static bool parseVariableValue(MutableStylePropertySet*, const AtomicString& propertyName, const String&, bool important, const CSSParserContext&); 58 static bool parseVariableValue(MutableStylePropertySet*, const AtomicString& propertyName, const String&, bool important, const CSSParserContext&);
59 static PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> parseInlineStyleDec laration(const String&, Element*); 59 static RawPtr<ImmutableStylePropertySet> parseInlineStyleDeclaration(const S tring&, Element*);
60 static bool parseDeclarationList(MutableStylePropertySet*, const String&, co nst CSSParserContext&); 60 static bool parseDeclarationList(MutableStylePropertySet*, const String&, co nst CSSParserContext&);
61 static PassRefPtrWillBeRawPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext&, StyleSheetContents*, AllowedRulesType); 61 static RawPtr<StyleRuleBase> parseRule(const String&, const CSSParserContext &, StyleSheetContents*, AllowedRulesType);
62 static void parseStyleSheet(const String&, const CSSParserContext&, StyleShe etContents*); 62 static void parseStyleSheet(const String&, const CSSParserContext&, StyleShe etContents*);
63 static CSSSelectorList parsePageSelector(CSSParserTokenRange, StyleSheetCont ents*); 63 static CSSSelectorList parsePageSelector(CSSParserTokenRange, StyleSheetCont ents*);
64 64
65 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&); 65 static PassOwnPtr<Vector<double>> parseKeyframeKeyList(const String&);
66 66
67 bool supportsDeclaration(CSSParserTokenRange&); 67 bool supportsDeclaration(CSSParserTokenRange&);
68 68
69 static void parseDeclarationListForInspector(const String&, const CSSParserC ontext&, CSSParserObserver&); 69 static void parseDeclarationListForInspector(const String&, const CSSParserC ontext&, CSSParserObserver&);
70 static void parseStyleSheetForInspector(const String&, const CSSParserContex t&, StyleSheetContents*, CSSParserObserver&); 70 static void parseStyleSheetForInspector(const String&, const CSSParserContex t&, StyleSheetContents*, CSSParserObserver&);
71 71
72 private: 72 private:
73 enum RuleListType { 73 enum RuleListType {
74 TopLevelRuleList, 74 TopLevelRuleList,
75 RegularRuleList, 75 RegularRuleList,
76 KeyframesRuleList 76 KeyframesRuleList
77 }; 77 };
78 78
79 // Returns whether the first encountered rule was valid 79 // Returns whether the first encountered rule was valid
80 template<typename T> 80 template<typename T>
81 bool consumeRuleList(CSSParserTokenRange, RuleListType, T callback); 81 bool consumeRuleList(CSSParserTokenRange, RuleListType, T callback);
82 82
83 // These two functions update the range they're given 83 // These two functions update the range they're given
84 PassRefPtrWillBeRawPtr<StyleRuleBase> consumeAtRule(CSSParserTokenRange&, Al lowedRulesType); 84 RawPtr<StyleRuleBase> consumeAtRule(CSSParserTokenRange&, AllowedRulesType);
85 PassRefPtrWillBeRawPtr<StyleRuleBase> consumeQualifiedRule(CSSParserTokenRan ge&, AllowedRulesType); 85 RawPtr<StyleRuleBase> consumeQualifiedRule(CSSParserTokenRange&, AllowedRule sType);
86 86
87 static PassRefPtrWillBeRawPtr<StyleRuleCharset> consumeCharsetRule(CSSParser TokenRange prelude); 87 static RawPtr<StyleRuleCharset> consumeCharsetRule(CSSParserTokenRange prelu de);
88 PassRefPtrWillBeRawPtr<StyleRuleImport> consumeImportRule(CSSParserTokenRang e prelude); 88 RawPtr<StyleRuleImport> consumeImportRule(CSSParserTokenRange prelude);
89 PassRefPtrWillBeRawPtr<StyleRuleNamespace> consumeNamespaceRule(CSSParserTok enRange prelude); 89 RawPtr<StyleRuleNamespace> consumeNamespaceRule(CSSParserTokenRange prelude) ;
90 PassRefPtrWillBeRawPtr<StyleRuleMedia> consumeMediaRule(CSSParserTokenRange prelude, CSSParserTokenRange block); 90 RawPtr<StyleRuleMedia> consumeMediaRule(CSSParserTokenRange prelude, CSSPars erTokenRange block);
91 PassRefPtrWillBeRawPtr<StyleRuleSupports> consumeSupportsRule(CSSParserToken Range prelude, CSSParserTokenRange block); 91 RawPtr<StyleRuleSupports> consumeSupportsRule(CSSParserTokenRange prelude, C SSParserTokenRange block);
92 PassRefPtrWillBeRawPtr<StyleRuleViewport> consumeViewportRule(CSSParserToken Range prelude, CSSParserTokenRange block); 92 RawPtr<StyleRuleViewport> consumeViewportRule(CSSParserTokenRange prelude, C SSParserTokenRange block);
93 PassRefPtrWillBeRawPtr<StyleRuleFontFace> consumeFontFaceRule(CSSParserToken Range prelude, CSSParserTokenRange block); 93 RawPtr<StyleRuleFontFace> consumeFontFaceRule(CSSParserTokenRange prelude, C SSParserTokenRange block);
94 PassRefPtrWillBeRawPtr<StyleRuleKeyframes> consumeKeyframesRule(bool webkitP refixed, CSSParserTokenRange prelude, CSSParserTokenRange block); 94 RawPtr<StyleRuleKeyframes> consumeKeyframesRule(bool webkitPrefixed, CSSPars erTokenRange prelude, CSSParserTokenRange block);
95 PassRefPtrWillBeRawPtr<StyleRulePage> consumePageRule(CSSParserTokenRange pr elude, CSSParserTokenRange block); 95 RawPtr<StyleRulePage> consumePageRule(CSSParserTokenRange prelude, CSSParser TokenRange block);
96 96
97 PassRefPtrWillBeRawPtr<StyleRuleKeyframe> consumeKeyframeStyleRule(CSSParser TokenRange prelude, CSSParserTokenRange block); 97 RawPtr<StyleRuleKeyframe> consumeKeyframeStyleRule(CSSParserTokenRange prelu de, CSSParserTokenRange block);
98 PassRefPtrWillBeRawPtr<StyleRule> consumeStyleRule(CSSParserTokenRange prelu de, CSSParserTokenRange block); 98 RawPtr<StyleRule> consumeStyleRule(CSSParserTokenRange prelude, CSSParserTok enRange block);
99 99
100 void consumeDeclarationList(CSSParserTokenRange, StyleRule::Type); 100 void consumeDeclarationList(CSSParserTokenRange, StyleRule::Type);
101 void consumeDeclaration(CSSParserTokenRange, StyleRule::Type); 101 void consumeDeclaration(CSSParserTokenRange, StyleRule::Type);
102 void consumeDeclarationValue(CSSParserTokenRange, CSSPropertyID, bool import ant, StyleRule::Type); 102 void consumeDeclarationValue(CSSParserTokenRange, CSSPropertyID, bool import ant, StyleRule::Type);
103 void consumeVariableValue(CSSParserTokenRange, const AtomicString& propertyN ame, bool important); 103 void consumeVariableValue(CSSParserTokenRange, const AtomicString& propertyN ame, bool important);
104 104
105 static PassOwnPtr<Vector<double>> consumeKeyframeKeyList(CSSParserTokenRange ); 105 static PassOwnPtr<Vector<double>> consumeKeyframeKeyList(CSSParserTokenRange );
106 106
107 // FIXME: Can we build StylePropertySets directly? 107 // FIXME: Can we build StylePropertySets directly?
108 // FIXME: Investigate using a smaller inline buffer 108 // FIXME: Investigate using a smaller inline buffer
109 WillBeHeapVector<CSSProperty, 256> m_parsedProperties; 109 HeapVector<CSSProperty, 256> m_parsedProperties;
110 CSSParserContext m_context; 110 CSSParserContext m_context;
111 111
112 RawPtrWillBeMember<StyleSheetContents> m_styleSheet; 112 Member<StyleSheetContents> m_styleSheet;
113 113
114 // For the inspector 114 // For the inspector
115 CSSParserObserverWrapper* m_observerWrapper; 115 CSSParserObserverWrapper* m_observerWrapper;
116 }; 116 };
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif // CSSParserImpl_h 120 #endif // CSSParserImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698