Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
| index b72300c1096ea9e3790bef6a13b2bde3bb33fe0b..ca65675f3869dddccececf2c8f9122fd0eb81b17 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl |
| @@ -103,9 +103,15 @@ class CORE_EXPORT ComputedStyleBase { |
| // use resetFoo(), which can be more efficient. |
| {% for field in fields %} |
| // {{field.property_name}} |
| + {% if field.is_property or field.is_inherited_flag %} |
|
sashab
2017/02/03 04:53:06
Do you need this? Why not have a way to get the de
shend
2017/02/03 05:11:32
I was trying to keep the generated code the same a
|
| inline static {{field.storage_type}} {{field.initial_method_name}}() { return {{field.default_value}}; } |
| + {% endif %} |
| {{field.storage_type}} {{field.getter_method_name}}() const { return static_cast<{{field.storage_type}}>({{field.name}}); } |
| + {% if field.is_nonproperty %} |
| + void {{field.setter_method_name}}() { {{field.name}} = true; } |
|
sashab
2017/02/03 04:53:06
Ahh, this is kind of annoying! Would be great to k
shend
2017/02/03 05:11:32
Yeah, so all nonproperty fields I've seen use the
|
| + {% else %} |
| void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); } |
| + {% endif %} |
| inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_value(field)}}; } |
| {% endfor %} |