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

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

Issue 2826653002: Generate getters/setters for some fields on groups in ComputedStyle (Closed)
Patch Set: Add new macro argument_type to be used in setter macros 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 8790c220a74458dfa70c7a5238d35b8e99f6a1ab..fd366ae6979722c3d32902d1e202fe74d33ad559 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
@@ -18,6 +18,14 @@ static_cast<{{field.type_name}}>({{value}})
{% if field.is_bit_field -%}
{{field.type_name}}
{%- else -%}
-const {{field.type_name}}&
+{{field.type_name}}&
{%- endif %}
{% endmacro %}
+
+{% macro argument_type(field) %}
+{% if field.is_bit_field -%}
+{{field.type_name}}
+{%- else -%}
+{{field.type_name}}&
suzyh_UTC10 (ex-contributor) 2017/04/20 00:12:18 Did you mean a const & here?
nainar 2017/04/20 02:53:04 Done.
+{%- endif %}
+{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698