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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl

Issue 2786883002: Generate subgroup StyleSurroundData in ComputedStyle. (Closed)
Patch Set: Fix things 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
index b3c23ae658e05511ec7a416b0f2bf12e297ef63e..40e44247a222977a28cea2e2b153b428341e4663 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
@@ -1,16 +1,16 @@
-{% from 'fields/field.tmpl' import encode, decode, return_type %}
+{% from 'fields/field.tmpl' import encode, decode, getter_expression, setter_expression, return_type %}
{% macro decl_methods(field) -%}
inline static {{field.type_name}} {{field.initial_method_name}}() {
return {{field.default_value}};
}
{{return_type(field)}} {{field.getter_method_name}}() const {
- return {{decode(field, field.name)}};
+ return {{decode(field, getter_expression(field))}};
}
-void {{field.setter_method_name}}({{field.type_name}} v) {
- {{field.name}} = {{encode(field, "v")}};
+void {{field.setter_method_name}}(const {{field.type_name}}& v) {
+ {{setter_expression(field)}} = {{encode(field, "v")}};
}
inline void {{field.resetter_method_name}}() {
- {{field.name}} = {{encode(field, field.default_value)}};
+ {{setter_expression(field)}} = {{encode(field, field.default_value)}};
}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698