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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 {% endif %} | 213 {% endif %} |
214 {% endfor %} | 214 {% endfor %} |
215 | 215 |
216 ~ComputedStyleBase() = default; | 216 ~ComputedStyleBase() = default; |
217 | 217 |
218 // Storage. | 218 // Storage. |
219 {% for subgroup in computed_style.subgroups %} | 219 {% for subgroup in computed_style.subgroups %} |
220 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; | 220 DataRef<{{subgroup.type_name}}> {{subgroup.member_name}}; |
221 {% endfor %} | 221 {% endfor %} |
222 | 222 |
223 static unsigned WidthToFixedPoint(float width) { | |
224 DCHECK_GE(width, 0); | |
225 return static_cast<unsigned>(std::min<float>(width, kMaxForBorderWidth) * | |
226 kBorderWidthDenominator); | |
227 } | |
228 | |
229 private: | 223 private: |
230 {% for field in computed_style.fields %} | 224 {% for field in computed_style.fields %} |
231 {{declare_storage(field)}} | 225 {{declare_storage(field)}} |
232 {% endfor %} | 226 {% endfor %} |
233 }; | 227 }; |
234 | 228 |
235 } // namespace blink | 229 } // namespace blink |
236 | 230 |
237 #endif // ComputedStyleBase_h | 231 #endif // ComputedStyleBase_h |
OLD | NEW |