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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl

Issue 2670433002: Makes descriptors hold nullptr for properties not implemented in API. (Closed)
Patch Set: Some formatting and rebase 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/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl
index 457060f0e4c2e1601451339999db441ff99cb75c..623c8948b7b82a89b3f8f1566073e9c2f62a711d 100644
--- a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl
@@ -14,14 +14,23 @@ static_assert(
"CSSPropertyDescriptor must be a POD to support using initializer lists.");
static CSSPropertyDescriptor cssPropertyDescriptors[] = {
- // An invalid CSSPropertyDescriptor. When functions are added to
- // CSSPropertyAPI, add a nullptr to represent their function pointers in the
- // struct initaliser.
- { nullptr, false },
- // When functions are added to CSSPropertyAPI, also add them to the struct
- // initaliser below.
+ // An invalid CSSPropertyDescriptor.
+ {
+ {% for valid_api_method in valid_api_methods %}
+ nullptr,
+ {% endfor %}
+ },
+ // CSSPropertyDescriptors for all valid properties.
{% for api_class in api_classes %}
- { {{api_class.classname}}::parseSingleValue, true },
+ {
+ {% for api_method in api_methods %}
+ {% if api_method in api_class.api_methods %}
+ {{api_class.classname}}:: {{api_method}},
gozzard 2017/02/01 06:37:49 nit: remove space after ::
+ {% else %}
+ nullptr,
+ {% endif %}
+ {% endfor %}
+ },
{% endfor %}
};

Powered by Google App Engine
This is Rietveld 408576698