Chromium Code Reviews| 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..ee077dc7822fe383a5c3f46ae095ec2aa389ebdd 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. |
| + { |
|
sashab
2017/02/01 17:50:20
YAY getting rid of code dependencies!! \o/
|
| + {% 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 %} |
|
sashab
2017/02/01 17:50:20
You can merge these:
{% for foo in bar if baz %}
aazzam
2017/02/01 22:33:16
done :) that makes things look a bit nicer!
|
| + {{api_class.classname}}::{{api_method}}, |
| + {% else %} |
| + nullptr, |
|
sashab
2017/02/01 17:50:20
One thing I'm worried about here is ordering. Sinc
aazzam
2017/02/01 22:33:15
ahhh I didn't even notice the ordering issue! that
|
| + {% endif %} |
| + {% endfor %} |
| + }, |
| {% endfor %} |
| }; |