OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CSSPropertyParserHelpers_h | 5 #ifndef CSSPropertyParserHelpers_h |
6 #define CSSPropertyParserHelpers_h | 6 #define CSSPropertyParserHelpers_h |
7 | 7 |
8 #include "core/css/CSSCustomIdentValue.h" | 8 #include "core/css/CSSCustomIdentValue.h" |
9 #include "core/css/CSSIdentifierValue.h" | 9 #include "core/css/CSSIdentifierValue.h" |
10 #include "core/css/CSSPrimitiveValue.h" | 10 #include "core/css/CSSPrimitiveValue.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 CSSValue* ConsumeImage( | 104 CSSValue* ConsumeImage( |
105 CSSParserTokenRange&, | 105 CSSParserTokenRange&, |
106 const CSSParserContext*, | 106 const CSSParserContext*, |
107 ConsumeGeneratedImagePolicy = ConsumeGeneratedImagePolicy::kAllow); | 107 ConsumeGeneratedImagePolicy = ConsumeGeneratedImagePolicy::kAllow); |
108 CSSValue* ConsumeImageOrNone(CSSParserTokenRange&, const CSSParserContext*); | 108 CSSValue* ConsumeImageOrNone(CSSParserTokenRange&, const CSSParserContext*); |
109 | 109 |
110 bool IsCSSWideKeyword(StringView); | 110 bool IsCSSWideKeyword(StringView); |
111 | 111 |
112 CSSIdentifierValue* ConsumeShapeBox(CSSParserTokenRange&); | 112 CSSIdentifierValue* ConsumeShapeBox(CSSParserTokenRange&); |
113 | 113 |
| 114 enum class IsImplicitProperty { kNotImplicit, kImplicit }; |
| 115 |
114 void AddProperty(CSSPropertyID resolved_property, | 116 void AddProperty(CSSPropertyID resolved_property, |
115 CSSPropertyID current_shorthand, | 117 CSSPropertyID current_shorthand, |
116 const CSSValue&, | 118 const CSSValue&, |
117 bool important, | 119 bool important, |
118 bool implicit, | 120 IsImplicitProperty, |
119 HeapVector<CSSProperty, 256>& properties); | 121 HeapVector<CSSProperty, 256>& properties); |
120 | 122 |
121 // Template implementations are at the bottom of the file for readability. | 123 // Template implementations are at the bottom of the file for readability. |
122 | 124 |
123 template <typename... emptyBaseCase> | 125 template <typename... emptyBaseCase> |
124 inline bool IdentMatches(CSSValueID id) { | 126 inline bool IdentMatches(CSSValueID id) { |
125 return false; | 127 return false; |
126 } | 128 } |
127 template <CSSValueID head, CSSValueID... tail> | 129 template <CSSValueID head, CSSValueID... tail> |
128 inline bool IdentMatches(CSSValueID id) { | 130 inline bool IdentMatches(CSSValueID id) { |
(...skipping 24 matching lines...) Expand all Loading... |
153 } while (ConsumeCommaIncludingWhitespace(range)); | 155 } while (ConsumeCommaIncludingWhitespace(range)); |
154 DCHECK(list->length()); | 156 DCHECK(list->length()); |
155 return list; | 157 return list; |
156 } | 158 } |
157 | 159 |
158 } // namespace CSSPropertyParserHelpers | 160 } // namespace CSSPropertyParserHelpers |
159 | 161 |
160 } // namespace blink | 162 } // namespace blink |
161 | 163 |
162 #endif // CSSPropertyParserHelpers_h | 164 #endif // CSSPropertyParserHelpers_h |
OLD | NEW |