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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl

Issue 2855583002: Fix ComputedStyleBase.h.tmpl to generate accessors for fields on groups (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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% from 'macros.tmpl' import license, print_if %} 1 {% from 'macros.tmpl' import license, print_if %}
2 {% from 'fields/field.tmpl' import encode, getter_expression, declare_storage, f ieldwise_compare %} 2 {% from 'fields/field.tmpl' import encode, getter_expression, declare_storage, f ieldwise_compare %}
3 {% from 'fields/group.tmpl' import define_field_group_class %} 3 {% from 'fields/group.tmpl' import define_field_group_class %}
4 {{license()}} 4 {{license()}}
5 5
6 #ifndef ComputedStyleBase_h 6 #ifndef ComputedStyleBase_h
7 #define ComputedStyleBase_h 7 #define ComputedStyleBase_h
8 8
9 #include "core/style/ComputedStyleConstants.h" 9 #include "core/style/ComputedStyleConstants.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ALWAYS_INLINE ComputedStyleBase() : 111 ALWAYS_INLINE ComputedStyleBase() :
112 {% for field in computed_style.fields %} 112 {% for field in computed_style.fields %}
113 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}} 113 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}}
114 {% endfor %} 114 {% endfor %}
115 { 115 {
116 {% for subgroup in computed_style.subgroups %} 116 {% for subgroup in computed_style.subgroups %}
117 {{subgroup.member_name}}.Init(); 117 {{subgroup.member_name}}.Init();
118 {% endfor %} 118 {% endfor %}
119 } 119 }
120 120
121 {% for field in computed_style.fields %} 121 {% for field in computed_style.all_fields %}
122 {% if field.field_template in ('storage_only', 'monotonic_flag', 'external') % } 122 {% if field.field_template in ('storage_only', 'monotonic_flag', 'external') % }
123 // {{field.property_name}} 123 // {{field.property_name}}
124 {{field_templates[field.field_template].decl_protected_methods(field)|indent(2 )}} 124 {{field_templates[field.field_template].decl_protected_methods(field)|indent(2 )}}
125 125
126 {% endif %} 126 {% endif %}
127 {% endfor %} 127 {% endfor %}
128 128
129 ~ComputedStyleBase() = default; 129 ~ComputedStyleBase() = default;
130 130
131 // Storage. 131 // Storage.
132 {% for subgroup in computed_style.subgroups %} 132 {% for subgroup in computed_style.subgroups %}
133 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; 133 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}};
134 {% endfor %} 134 {% endfor %}
135 135
136 private: 136 private:
137 {% for field in computed_style.fields %} 137 {% for field in computed_style.fields %}
138 {{declare_storage(field)}} 138 {{declare_storage(field)}}
139 {% endfor %} 139 {% endfor %}
140 }; 140 };
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif // ComputedStyleBase_h 144 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/fields/base.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698