OLD | NEW |
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 #include "core/css/parser/CSSParserFastPaths.h" | 5 #include "core/css/parser/CSSParserFastPaths.h" |
6 | 6 |
7 #include "core/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
8 #include "core/css/CSSColorValue.h" | 8 #include "core/css/CSSColorValue.h" |
9 #include "core/css/CSSFunctionValue.h" | 9 #include "core/css/CSSFunctionValue.h" |
10 #include "core/css/CSSIdentifierValue.h" | 10 #include "core/css/CSSIdentifierValue.h" |
11 #include "core/css/CSSInheritedValue.h" | 11 #include "core/css/CSSInheritedValue.h" |
12 #include "core/css/CSSInitialValue.h" | 12 #include "core/css/CSSInitialValue.h" |
13 #include "core/css/CSSPrimitiveValue.h" | 13 #include "core/css/CSSPrimitiveValue.h" |
14 #include "core/css/StyleColor.h" | 14 #include "core/css/StyleColor.h" |
15 #include "core/css/parser/CSSParserIdioms.h" | 15 #include "core/css/parser/CSSParserIdioms.h" |
16 #include "core/css/parser/CSSPropertyParser.h" | 16 #include "core/css/parser/CSSPropertyParser.h" |
17 #include "core/html/parser/HTMLParserIdioms.h" | 17 #include "core/html/parser/HTMLParserIdioms.h" |
18 #include "platform/RuntimeEnabledFeatures.h" | 18 #include "platform/RuntimeEnabledFeatures.h" |
19 #include "wtf/text/StringToNumber.h" | 19 #include "wtf/text/StringToNumber.h" |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, | 23 static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, |
24 bool& acceptsNegativeNumbers) { | 24 bool& acceptsNegativeNumbers) { |
25 switch (propertyId) { | 25 switch (propertyId) { |
| 26 case CSSPropertyBlockSize: |
| 27 case CSSPropertyInlineSize: |
| 28 case CSSPropertyMinBlockSize: |
| 29 case CSSPropertyMinInlineSize: |
26 case CSSPropertyFontSize: | 30 case CSSPropertyFontSize: |
27 case CSSPropertyGridColumnGap: | 31 case CSSPropertyGridColumnGap: |
28 case CSSPropertyGridRowGap: | 32 case CSSPropertyGridRowGap: |
29 case CSSPropertyHeight: | 33 case CSSPropertyHeight: |
30 case CSSPropertyWidth: | 34 case CSSPropertyWidth: |
31 case CSSPropertyMinHeight: | 35 case CSSPropertyMinHeight: |
32 case CSSPropertyMinWidth: | 36 case CSSPropertyMinWidth: |
33 case CSSPropertyPaddingBottom: | 37 case CSSPropertyPaddingBottom: |
34 case CSSPropertyPaddingLeft: | 38 case CSSPropertyPaddingLeft: |
35 case CSSPropertyPaddingRight: | 39 case CSSPropertyPaddingRight: |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 if (isColorPropertyID(propertyID)) | 1205 if (isColorPropertyID(propertyID)) |
1202 return parseColor(string, parserMode); | 1206 return parseColor(string, parserMode); |
1203 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) | 1207 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) |
1204 return keyword; | 1208 return keyword; |
1205 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) | 1209 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) |
1206 return transform; | 1210 return transform; |
1207 return nullptr; | 1211 return nullptr; |
1208 } | 1212 } |
1209 | 1213 |
1210 } // namespace blink | 1214 } // namespace blink |
OLD | NEW |