| 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 using namespace cssvalue; |
| 24 |
| 23 static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, | 25 static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, |
| 24 bool& acceptsNegativeNumbers) { | 26 bool& acceptsNegativeNumbers) { |
| 25 switch (propertyId) { | 27 switch (propertyId) { |
| 26 case CSSPropertyBlockSize: | 28 case CSSPropertyBlockSize: |
| 27 case CSSPropertyInlineSize: | 29 case CSSPropertyInlineSize: |
| 28 case CSSPropertyMinBlockSize: | 30 case CSSPropertyMinBlockSize: |
| 29 case CSSPropertyMinInlineSize: | 31 case CSSPropertyMinInlineSize: |
| 30 case CSSPropertyFontSize: | 32 case CSSPropertyFontSize: |
| 31 case CSSPropertyGridColumnGap: | 33 case CSSPropertyGridColumnGap: |
| 32 case CSSPropertyGridRowGap: | 34 case CSSPropertyGridRowGap: |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 if (isColorPropertyID(propertyID)) | 1210 if (isColorPropertyID(propertyID)) |
| 1209 return parseColor(string, parserMode); | 1211 return parseColor(string, parserMode); |
| 1210 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) | 1212 if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode)) |
| 1211 return keyword; | 1213 return keyword; |
| 1212 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) | 1214 if (CSSValue* transform = parseSimpleTransform(propertyID, string)) |
| 1213 return transform; | 1215 return transform; |
| 1214 return nullptr; | 1216 return nullptr; |
| 1215 } | 1217 } |
| 1216 | 1218 |
| 1217 } // namespace blink | 1219 } // namespace blink |
| OLD | NEW |