Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h |
| diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e48ef5d2def2310164c984e2b415c9f441bd7a98 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CSSPropertyAPI_h |
| +#define CSSPropertyAPI_h |
| + |
| +#include "core/CSSPropertyNames.h" |
| +#include "core/css/CSSValue.h" |
| +#include "core/css/parser/CSSParserMode.h" |
| +#include "core/css/parser/CSSParserTokenRange.h" |
| + |
| +namespace blink { |
| + |
| +/* |
| +An API for CSS properties which allows you to call functions on properties |
| +from within the parser. To enusre that all functions are implemented, provide |
| +implementations for all functions with a default implementation or |
| +NOTREACHED(). |
| +*/ |
| +class CSSPropertyAPI { |
| + public: |
| + // Parses the CSS property and returns a CSS Value. |
| + static const CSSValue* parseSingleValue(CSSParserTokenRange&, |
| + const CSSParserContext&) { |
| + NOTREACHED(); |
| + return nullptr; |
| + } |
| + |
| + // Returns the CSSPropertyID of the property |
| + static inline CSSPropertyID getID() { |
| + NOTREACHED(); |
| + return CSSPropertyInvalid; |
| + } |
| +}; |
| +} |
|
alancutter (OOO until 2018)
2016/11/29 06:51:49
I don't think this class is necessary. Without it
aazzam
2016/11/30 23:32:53
I think we should keep the class since it's a way
|
| + |
| +#endif // CSSPropertyAPI_h |