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

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

Issue 2923493003: Make ComputedStyleBase internal pointer setters move-only. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% import 'fields/base.tmpl' as base %} 1 {% import 'fields/base.tmpl' as base %}
2 {% from 'fields/field.tmpl' import getter_expression, setter_expression %} 2 {% from 'fields/field.tmpl' import getter_expression, setter_expression %}
3 3
4 {% macro decl_public_methods(field) -%} 4 {% macro decl_public_methods(field) -%}
5 // Getters and setters not generated 5 // Getters and setters not generated
6 {%- endmacro %} 6 {%- endmacro %}
7 7
8 {% macro decl_protected_methods(field) -%} 8 {% macro decl_protected_methods(field) -%}
9 {{base.decl_internal_getter_method(field)}} 9 {{base.decl_internal_getter_method(field)}}
10 {% if not field.wrapper_pointer_name %}
10 {{base.decl_internal_setter_method(field)}} 11 {{base.decl_internal_setter_method(field)}}
12 {% endif %}
11 {% if not field.is_bit_field -%} 13 {% if not field.is_bit_field -%}
12 void {{field.internal_setter_method_name}}({{field.type_name}}&& v) { 14 void {{field.internal_setter_method_name}}({{field.type_name}}&& v) {
13 {% if field.group_member_name %} 15 {% if field.group_member_name %}
14 if (!({{getter_expression(field)}} == v)) 16 if (!({{getter_expression(field)}} == v))
15 {{setter_expression(field)}} = std::move(v); 17 {{setter_expression(field)}} = std::move(v);
16 {% else %} 18 {% else %}
17 {{field.name}} = std::move(v); 19 {{field.name}} = std::move(v);
18 {% endif %} 20 {% endif %}
19 } 21 }
20 {{base.decl_mutable_method(field)}} 22 {{base.decl_mutable_method(field)}}
21 {%- endif %} 23 {%- endif %}
22 {%- endmacro %} 24 {%- endmacro %}
23 25
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698