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

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

Issue 2697953004: Add support for generating external types in ComputedStyleBase. (Closed)
Patch Set: remove unused macro Created 3 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..8790c220a74458dfa70c7a5238d35b8e99f6a1ab
--- /dev/null
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/field.tmpl
@@ -0,0 +1,23 @@
+{% macro encode(field, value) %}
+{% if field.is_bit_field -%}
+static_cast<unsigned>({{value}})
+{%- else -%}
+{{value}}
+{%- endif %}
+{% endmacro %}
+
+{% macro decode(field, value) %}
+{% if field.is_bit_field -%}
+static_cast<{{field.type_name}}>({{value}})
+{%- else -%}
+{{value}}
+{%- endif %}
+{% endmacro %}
+
+{% macro return_type(field) %}
+{% if field.is_bit_field -%}
+{{field.type_name}}
+{%- else -%}
+const {{field.type_name}}&
+{%- endif %}
+{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698