| 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
|
| index 938a6e0e977603950a0aadbb1591851e1e270c07..3f73dadffba756012495c4237eef1785fa786950 100644
|
| --- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
|
| +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
|
| @@ -18,21 +18,18 @@
|
| // logic inside the blink style engine. All specific properties are subclasses
|
| // of CSSPropertyAPI.
|
| //
|
| -// To add a new implementation of this API for a property:
|
| -// - Make a class that implements CSSPropertyAPI.
|
| -// - For each method that you wish to implement in this class, add this method
|
| -// name to the api_methods flag in CSSProperties.json5.
|
| -// - Implement these methods in the .cpp file.
|
| +// To add a new property using this API:
|
| +// - Make a class that implements CSSPropertyAPI, and implement the static
|
| +// methods.
|
| +// - Update the cssPropertyDescriptors array in CSSPropertyDescriptor.cpp to
|
| +// call GET_DESCRIPTOR(classname).
|
| //
|
| -// To add new functions to this API:
|
| -// - Add the function to the struct below.
|
| -// - Add the function to CSSPropertyAPIFiles.h.tmpl template file, surrounded
|
| -// with an {% if "methodName" in implementedMethods %} check.
|
| -// - Add the function name to the valid_methods array in
|
| -// make_css_property_apis.py.
|
| -// - Add function to the initializer list in the cssPropertyDescriptors array
|
| -// in CSSPropertyDescriptor.cpp.tmpl, and add a nullptr to the invalid
|
| -// CSSPropertyDescriptor.
|
| +// To add new functions using this API:
|
| +// - New functions and static variables can be added in this class. A default
|
| +// implementation of functions can optionally be provided.
|
| +// - When adding new functions, also add them to GET_DESCRIPTOR, and the get()
|
| +// method in CSSPropertyDescriptors.cpp, and the descriptor struct in
|
| +// CSSPropertyDescriptor.h.
|
| class CSSPropertyAPI {
|
| STATIC_ONLY(CSSPropertyAPI);
|
|
|
| @@ -40,12 +37,7 @@
|
| // Parses a single CSS property and returns the corresponding CSSValue. If the
|
| // input is invalid it returns nullptr.
|
| static const CSSValue* parseSingleValue(CSSParserTokenRange&,
|
| - const CSSParserContext*) {
|
| - // No code should reach here, since properties either have their own
|
| - // implementations of this method or store nullptr in their descriptor.
|
| - NOTREACHED();
|
| - return nullptr;
|
| - }
|
| + const CSSParserContext*);
|
| };
|
|
|
| } // namespace blink
|
|
|