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

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

Issue 2786883002: Generate subgroup StyleSurroundData in ComputedStyle. (Closed)
Patch Set: Rebase 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 82ecd9e49f81d3128684819af5ae289625e9e82d..ed8fb52edc3f13dfcbc4df70ed122655aeaba219 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl
@@ -1,4 +1,4 @@
-{% from 'fields/field.tmpl' import encode, decode, const_ref, nonconst_ref %}
+{% from 'fields/field.tmpl' import encode, decode, const_ref, nonconst_ref, getter_expression, setter_expression %}
{% macro decl_initial_method(field) -%}
inline static {{field.type_name}} {{field.initial_method_name}}() {
@@ -8,36 +8,36 @@ inline static {{field.type_name}} {{field.initial_method_name}}() {
{% macro decl_getter_method(field) -%}
{{const_ref(field)}} {{field.getter_method_name}}() const {
- return {{decode(field, field.name)}};
+ return {{decode(field, getter_expression(field))}};
}
{%- endmacro %}
{% macro decl_setter_method(field) -%}
void {{field.setter_method_name}}({{const_ref(field)}} v) {
- {{field.name}} = {{encode(field, "v")}};
+ {{setter_expression(field)}} = {{encode(field, "v")}};
}
{%- endmacro %}
{% macro decl_resetter_method(field) -%}
inline void {{field.resetter_method_name}}() {
- {{field.name}} = {{encode(field, field.default_value)}};
+ {{setter_expression(field)}} = {{encode(field, field.default_value)}};
}
{%- endmacro %}
{% macro decl_mutable_method(field) -%}
{{nonconst_ref(field)}} {{field.mutable_method_name}}() const {
- return {{decode(field, field.name)}};
+ return {{decode(field, getter_expression(field))}};
}
{%- endmacro %}
{% macro decl_internal_getter_method(field) -%}
{{const_ref(field)}} {{field.internal_getter_method_name}}() const {
- return {{decode(field, field.name)}};
+ return {{decode(field, getter_expression(field))}};
}
{%- endmacro %}
{% macro decl_internal_setter_method(field) -%}
void {{field.internal_setter_method_name}}({{const_ref(field)}} v) {
- {{field.name}} = {{encode(field, "v")}};
+ {{setter_expression(field)}} = {{encode(field, "v")}};
}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698