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

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

Issue 2826653002: Generate getters/setters for some fields on groups in ComputedStyle (Closed)
Patch Set: Incorporating shend@'s suggestions 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 dfae1505d607526465d4d271b8dbf48b441e635f..1332ea570a3571d6503045b162fade95fcb9c64b 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,5 +1,5 @@
-{% from 'fields/field.tmpl' import encode %}
-{% macro decl_methods(field) %}
+{% from 'fields/field.tmpl' import encode, decode, return_type %}
nainar 2017/04/19 08:49:35 This is extra as well.
+{% macro decl_public_methods(field) %}
bool {{field.getter_method_name}}() const {
return {{field.name}};
}
@@ -7,3 +7,8 @@ void {{field.setter_method_name}}() {
{{field.name}} = {{encode(field, "true")}};
}
{% endmacro %}
+{% macro decl_protected_methods(field) -%}
+void {{field.internal_setter_method_name}}(const {{field.type_name}}& v) {
+ {{field.name}} = {{encode(field, "v")}};
+}
+{%- endmacro %}

Powered by Google App Engine
This is Rietveld 408576698