Chromium Code Reviews| OLD | NEW |
|---|---|
| 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, setter_expression, declare_storage, fieldwise_compare, fieldwise_copy, fieldwise_diff, fieldwise_p ointer_compare_inherited %} | 2 {% from 'fields/field.tmpl' import encode, getter_expression, setter_expression, declare_storage, fieldwise_compare, fieldwise_copy, fieldwise_diff, fieldwise_p ointer_compare_inherited %} |
| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 {% endfor %} | 159 {% endfor %} |
| 160 | 160 |
| 161 protected: | 161 protected: |
| 162 // Constructor and destructor are protected so that only the parent class Comp utedStyle | 162 // Constructor and destructor are protected so that only the parent class Comp utedStyle |
| 163 // can instantiate this class. | 163 // can instantiate this class. |
| 164 ALWAYS_INLINE ComputedStyleBase() : | 164 ALWAYS_INLINE ComputedStyleBase() : |
| 165 {% for field in computed_style.fields %} | 165 {% for field in computed_style.fields %} |
| 166 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}} | 166 {{field.name}}({{encode(field, field.default_value)}}){{print_if(not loop. last, ',')}} |
| 167 {% endfor %} | 167 {% endfor %} |
| 168 { | 168 { |
| 169 static_assert(std::is_same<ComputedStyle, ComputedStyleFinal>::value, "Compu tedStyleBase can only be templated with ComputedStyle"); | |
|
alancutter (OOO until 2018)
2017/05/24 01:45:26
Woah magic.
| |
| 169 {% for subgroup in computed_style.subgroups %} | 170 {% for subgroup in computed_style.subgroups %} |
| 170 {{subgroup.member_name}}.Init(); | 171 {{subgroup.member_name}}.Init(); |
| 171 {% endfor %} | 172 {% endfor %} |
| 172 } | 173 } |
| 173 | 174 |
| 174 {% for field in computed_style.all_fields %} | 175 {% for field in computed_style.all_fields %} |
| 175 {% if field.field_template in ('storage_only', 'monotonic_flag', 'external') % } | 176 {% if field.field_template in ('storage_only', 'monotonic_flag', 'external') % } |
| 176 // {{field.property_name}} | 177 // {{field.property_name}} |
| 177 {{field_templates[field.field_template].decl_protected_methods(field)|indent(2 )}} | 178 {{field_templates[field.field_template].decl_protected_methods(field)|indent(2 )}} |
| 178 | 179 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 194 | 195 |
| 195 private: | 196 private: |
| 196 {% for field in computed_style.fields %} | 197 {% for field in computed_style.fields %} |
| 197 {{declare_storage(field)}} | 198 {{declare_storage(field)}} |
| 198 {% endfor %} | 199 {% endfor %} |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 } // namespace blink | 202 } // namespace blink |
| 202 | 203 |
| 203 #endif // ComputedStyleBase_h | 204 #endif // ComputedStyleBase_h |
| OLD | NEW |