| 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 #ifndef CSSParserFastPaths_h | 5 #ifndef CSSParserFastPaths_h |
| 6 #define CSSParserFastPaths_h | 6 #define CSSParserFastPaths_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/CSSValueKeywords.h" | 9 #include "core/CSSValueKeywords.h" |
| 10 #include "platform/graphics/Color.h" | 10 #include "platform/graphics/Color.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" |
| 13 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class CSSValue; | 17 class CSSValue; |
| 18 | 18 |
| 19 class CORE_EXPORT CSSParserFastPaths { | 19 class CORE_EXPORT CSSParserFastPaths { |
| 20 STATIC_ONLY(CSSParserFastPaths); | 20 STATIC_ONLY(CSSParserFastPaths); |
| 21 | 21 |
| 22 public: | 22 public: |
| 23 // Parses simple values like '10px' or 'green', but makes no guarantees | 23 // Parses simple values like '10px' or 'green', but makes no guarantees |
| 24 // about handling any property completely. | 24 // about handling any property completely. |
| 25 static CSSValue* maybeParseValue(CSSPropertyID, const String&, CSSParserMode); | 25 static CSSValue* maybeParseValue(CSSPropertyID, const String&, CSSParserMode); |
| 26 | 26 |
| 27 // Properties handled here shouldn't be explicitly handled in CSSPropertyParse
r | 27 // Properties handled here shouldn't be explicitly handled in |
| 28 // CSSPropertyParser |
| 28 static bool isKeywordPropertyID(CSSPropertyID); | 29 static bool isKeywordPropertyID(CSSPropertyID); |
| 29 static bool isValidKeywordPropertyAndValue(CSSPropertyID, | 30 static bool isValidKeywordPropertyAndValue(CSSPropertyID, |
| 30 CSSValueID, | 31 CSSValueID, |
| 31 CSSParserMode); | 32 CSSParserMode); |
| 32 | 33 |
| 33 static CSSValue* parseColor(const String&, CSSParserMode); | 34 static CSSValue* parseColor(const String&, CSSParserMode); |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 } // namespace blink | 37 } // namespace blink |
| 37 | 38 |
| 38 #endif // CSSParserFastPaths_h | 39 #endif // CSSParserFastPaths_h |
| OLD | NEW |