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

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

Issue 2885333002: Add internal move setter for storage_only fields in ComputedStyle (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl b/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
index 4f9a3bccc5eef1f2cd94f4c8f928c9265c8b8b58..5d7c25f346fe56a084400d16ac0fcb6d868c7ede 100644
--- a/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl
@@ -1,4 +1,5 @@
{% import 'fields/base.tmpl' as base %}
+{% from 'fields/field.tmpl' import getter_expression, setter_expression %}
{% macro decl_public_methods(field) -%}
// Getters and setters not generated
@@ -8,6 +9,14 @@
{{base.decl_internal_getter_method(field)}}
{{base.decl_internal_setter_method(field)}}
{% if not field.is_bit_field -%}
+void {{field.internal_setter_method_name}}({{field.type_name}}&& 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_mutable_method(field)}}
{%- endif %}
{%- endmacro %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698