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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl

Issue 2826653002: Generate getters/setters for some fields on groups in ComputedStyle (Closed)
Patch Set: suzyh@'s comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 {% import 'fields/base.tmpl' as base %} 1 {% import 'fields/base.tmpl' as base %}
2 {% from 'fields/field.tmpl' import decode %} 2 {% from 'fields/field.tmpl' import decode %}
3 {% macro decl_methods(field) %} 3 {% macro decl_public_methods(field) %}
4 {{base.decl_methods(field)}} 4 {{base.decl_public_methods(field)}}
5 void {{field.setter_method_name}}({{field.type_name}}&& v) { 5 void {{field.setter_method_name}}({{field.type_name}}&& v) {
6 {{field.name}} = std::move({{decode(field, "v")}}); 6 {{field.name}} = std::move({{decode(field, "v")}});
7 } 7 }
8 {% endmacro %} 8 {% endmacro %}
9
10 {% macro decl_protected_methods(field) -%}
11 {{return_type}} {{field.internal_mutable_method_name}}() {
shend 2017/04/20 03:57:55 I think this one can stay as {{field.type_name}}&.
nainar 2017/04/20 05:15:58 Done.
12 return {{decode(field, field.name)}};
13 }
14 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698