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

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

Issue 2829213002: Clean up ComputedStyle field templates. (Closed)
Patch Set: 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/monotonic_flag.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/monotonic_flag.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/monotonic_flag.tmpl
index afa64134a5f8fe3c48636f50f0486b0ff00059a9..c78f9f775ce4a2cd8000bd11ca523f95bbec0a68 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/monotonic_flag.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/monotonic_flag.tmpl
@@ -1,14 +1,13 @@
-{% from 'fields/field.tmpl' import encode, argument_type %}
+{% import 'fields/base.tmpl' as base %}
+{% from 'fields/field.tmpl' import encode %}
+
{% macro decl_public_methods(field) %}
-bool {{field.getter_method_name}}() const {
- return {{field.name}};
-}
+{{base.decl_getter_method(field)}}
void {{field.setter_method_name}}() {
{{field.name}} = {{encode(field, "true")}};
}
{% endmacro %}
+
{% macro decl_protected_methods(field) -%}
-void {{field.internal_setter_method_name}}({{argument_type(field)}} v) {
- {{field.name}} = {{encode(field, "v")}};
-}
+{{base.decl_internal_setter_method(field)}}
{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698