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

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

Issue 2879493003: Check if value changed when setting nested fields in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 7 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/external.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl
index 839d395a38a8ea022d6923cd95812b868721f5da..08600f1ba6ad506735d3a56c41683a5bcb1a920e 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/external.tmpl
@@ -1,12 +1,17 @@
{% import 'fields/base.tmpl' as base %}
-{% from 'fields/field.tmpl' import setter_expression %}
+{% from 'fields/field.tmpl' import getter_expression, setter_expression %}
{% macro decl_public_methods(field) %}
{{base.decl_initial_method(field)}}
{{base.decl_getter_method(field)}}
{{base.decl_setter_method(field)}}
void {{field.setter_method_name}}({{field.type_name}}&& v) {
- {{setter_expression(field)}} = std::move(v);
+{% if field.group_member_name %}
+ if (!({{getter_expression(field)}} == v))
+ {{setter_expression(field)}} = std::move(v);
+{% else %}
+ {{field.name}} = std::move(v);
+{% endif %}
}
{{base.decl_resetter_method(field)}}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698