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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl

Issue 2673283002: Added CSSPropertyAPI.h.tmpl to generate CSSPropertyAPI.h. (Closed)
Patch Set: Added comment field to CSSPropertyAPIMethods.json5 Created 3 years, 10 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/build/scripts/templates/CSSPropertyAPI.h.tmpl
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl
similarity index 56%
rename from third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
rename to third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl
index 0280eb94863d2d3b745c8897518171730a5adf54..32841b675f3062c6258fec250dd82857529c6d9c 100644
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPI.h
+++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyAPI.h.tmpl
@@ -32,26 +32,14 @@ class CSSPropertyAPI {
STATIC_ONLY(CSSPropertyAPI);
public:
- // 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;
- }
-
- static bool parseShorthand(bool,
- 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 false;
- }
+ {% for api_method_name in ordered_api_method_names %}
+ {% for comment_line in all_api_methods[api_method_name].comment %}
sashab 2017/02/10 02:47:09 Now not needed
+ // {{comment_line}}
+ {% endfor %}
+ static {{all_api_methods[api_method_name].return_type}} {{api_method_name}}{{all_api_methods[api_method_name].parameters}};
+ {% endfor %}
};
-} // namespace blink
+} // namespace blink
-#endif // CSSPropertyAPI_h
+#endif // CSSPropertyAPI_h

Powered by Google App Engine
This is Rietveld 408576698