Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h

Issue 2653733005: Added parseShorthand method from the parser to CSSPropertyAPI.h. (Closed)
Patch Set: Moved implementation check into macro in CSSPropertyDescriptor.h Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3f73dadffba756012495c4237eef1785fa786950..14e03bbd40dc87ae29ced27d0f143d92c3c2bc89 100644
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
@@ -21,15 +21,15 @@ class CSSParserTokenRange;
// 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).
+// - Add the api_class flag to the property CSSProperties.in file, with an
+// optional class name for grouped properties.
//
// 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.
+// - New functions and static variables can be added in this class.
+// - When adding new functions, also add them to the initializer list in
+// the cssPropertyDescriptors in CSSPropertyDescriptor.cpp.tmpl, and add a
+// nullptr to the invalid CSSPropertyDescriptor.
+
class CSSPropertyAPI {
STATIC_ONLY(CSSPropertyAPI);
@@ -37,7 +37,17 @@ class CSSPropertyAPI {
// 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*);
+ const CSSParserContext*) {
+ NOTREACHED();
+ return nullptr;
+ }
+
+ static bool parseShorthand(bool,
+ CSSParserTokenRange&,
+ const CSSParserContext*) {
+ NOTREACHED();
+ return false;
+ }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698