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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/fields/field.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/field.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
index d5e4a2b15078409d7a7d6c6840b0147b959283b5..9ded9eaa63683bd3fcf314347bd275ad3e251695 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
@@ -14,6 +14,22 @@ static_cast<{{field.type_name}}>({{value}})
{%- endif %}
{% endmacro %}
+{% macro getter_expression(field) %}
+{% if field.group_member_name -%}
+{{field.group_member_name}}->{{field.name}}
+{%- else -%}
+{{field.name}}
+{%- endif %}
+{% endmacro %}
+
+{% macro setter_expression(field) %}
+{% if field.group_member_name -%}
+{{field.group_member_name}}.Access()->{{field.name}}
+{%- else -%}
+{{field.name}}
+{%- endif %}
+{% endmacro %}
+
{% macro nonconst_ref(field) %}
{% if field.is_bit_field -%}
{{field.type_name}}
@@ -29,3 +45,11 @@ static_cast<{{field.type_name}}>({{value}})
const {{field.type_name}}&
{%- endif %}
{% endmacro %}
+
+{% macro declare_storage(field) %}
+{% if field.is_bit_field %}
+unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
+{%- else %}
+{{field.type_name}} {{field.name}};
+{%- endif %}
+{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698