| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CSSPropertyFunctions_h | 5 #ifndef CSSPropertyFunctions_h |
| 6 #define CSSPropertyFunctions_h | 6 #define CSSPropertyFunctions_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/css/CSSValue.h" | 9 #include "core/css/CSSValue.h" |
| 10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class CSSParserContext; | 14 class CSSParserContext; |
| 15 class CSSParserTokenRange; | 15 class CSSParserTokenRange; |
| 16 | 16 |
| 17 // The parent class for all properties that implement the CSSPropertyDescriptor
API. | 17 // The parent class for all properties that implement the CSSPropertyDescriptor
API. |
| 18 // Contains static function signatures as a reference of what needs to be implem
ented | 18 // Contains static function signatures as a reference of what needs to be implem
ented |
| 19 // in the child classes. | 19 // in the child classes. |
| 20 class CSSPropertyFunctions { | 20 class CSSPropertyFunctions { |
| 21 STATIC_ONLY(CSSPropertyFunctions); | 21 STATIC_ONLY(CSSPropertyFunctions); |
| 22 public: | 22 public: |
| 23 static CSSPropertyID id(); | 23 static CSSPropertyID id(); |
| 24 | 24 |
| 25 // Consumes and parses a single value for this property from by the token ra
nge, | 25 // Consumes and parses a single value for this property from by the token ra
nge, |
| 26 // returning the corresponding CSSValue. This function does not check for th
e end | 26 // returning the corresponding CSSValue. This function does not check for th
e end |
| 27 // of the token range. Returns nullptr if the input is invalid. | 27 // of the token range. Returns nullptr if the input is invalid. |
| 28 static RawPtr<CSSValue> parseSingleValue(CSSParserTokenRange&, const CSSPars
erContext&); | 28 static CSSValue* parseSingleValue(CSSParserTokenRange&, const CSSParserConte
xt&); |
| 29 using parseSingleValueFunction = decltype(&parseSingleValue); | 29 using parseSingleValueFunction = decltype(&parseSingleValue); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace blink | 32 } // namespace blink |
| 33 | 33 |
| 34 #endif // CSSPropertyFunctions_h | 34 #endif // CSSPropertyFunctions_h |
| OLD | NEW |