| 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/Forward.h" | 12 #include "wtf/Forward.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class CSSValue; | 16 class NullableCSSValue; |
| 17 | 17 |
| 18 class CSSParserFastPaths { | 18 class CSSParserFastPaths { |
| 19 public: | 19 public: |
| 20 // Parses simple values like '10px' or 'green', but makes no guarantees | 20 // Parses simple values like '10px' or 'green', but makes no guarantees |
| 21 // about handling any property completely. | 21 // about handling any property completely. |
| 22 static PassRefPtrWillBeRawPtr<CSSValue> maybeParseValue(CSSPropertyID, const
String&, CSSParserMode); | 22 static NullableCSSValue maybeParseValue(CSSPropertyID, const String&, CSSPar
serMode); |
| 23 | 23 |
| 24 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar
ser | 24 // Properties handled here shouldn't be explicitly handled in CSSPropertyPar
ser |
| 25 static bool isKeywordPropertyID(CSSPropertyID); | 25 static bool isKeywordPropertyID(CSSPropertyID); |
| 26 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID); | 26 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID); |
| 27 | 27 |
| 28 static PassRefPtrWillBeRawPtr<CSSValue> parseColor(const String&, bool quirk
sMode); | 28 static NullableCSSValue parseColor(const String&, bool quirksMode); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } // namespace blink | 31 } // namespace blink |
| 32 | 32 |
| 33 #endif // CSSParserFastPaths_h | 33 #endif // CSSParserFastPaths_h |
| OLD | NEW |