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