Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwi se_copy %} | 2 {% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwi se_copy, fieldwise_diff %} |
| 3 {{license()}} | 3 {{license()}} |
| 4 | 4 |
| 5 #include "core/ComputedStyleBase.h" | 5 #include "core/ComputedStyleBase.h" |
| 6 #include "platform/wtf/SizeAssertions.h" | 6 #include "platform/wtf/SizeAssertions.h" |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 | 9 |
| 10 struct SameSizeAsComputedStyleBase { | 10 struct SameSizeAsComputedStyleBase { |
| 11 {% if computed_style.subgroups is defined %} | 11 {% if computed_style.subgroups is defined %} |
| 12 void* dataRefs[{{computed_style.subgroups|length}}]; | 12 void* dataRefs[{{computed_style.subgroups|length}}]; |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 41 } | 41 } |
| 42 | 42 |
| 43 void ComputedStyleBase::PropagateIndependentInheritedProperties( | 43 void ComputedStyleBase::PropagateIndependentInheritedProperties( |
| 44 const ComputedStyleBase& parentStyle) { | 44 const ComputedStyleBase& parentStyle) { |
| 45 {% for field in computed_style.all_fields if field.is_property and field.is_in dependent %} | 45 {% for field in computed_style.all_fields if field.is_property and field.is_in dependent %} |
| 46 if ({{field.is_inherited_method_name}}()) | 46 if ({{field.is_inherited_method_name}}()) |
| 47 {{setter_expression(field)}} = parentStyle.{{getter_expression(field)}}; | 47 {{setter_expression(field)}} = parentStyle.{{getter_expression(field)}}; |
| 48 {% endfor %} | 48 {% endfor %} |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool ComputedStyleBase::ScrollAnchorDisablingPropertyChanged( | |
| 52 const ComputedStyleBase& other, | |
| 53 const StyleDifference& diff) const { | |
| 54 {{fieldwise_diff(computed_style, computed_style.all_fields | |
| 55 |selectattr("property_name", "in", ["bottom", "left", "margin-bottom", "ma rgin-left", "margin-right", "margin-top", "padding-bottom", "padding-left", "pad ding-right", "padding-top", "right", "top"]) | |
|
shend
2017/05/03 05:18:12
I would order these properties in their original o
nainar
2017/05/03 06:49:57
Done.
| |
| 56 |list | |
| 57 )|indent(2)}} | |
| 58 return false; | |
| 59 } | |
| 60 | |
| 61 bool ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation( | |
| 62 const ComputedStyleBase& other) const { | |
| 63 {{fieldwise_diff(computed_style, computed_style.all_fields | |
| 64 |selectattr("property_name", "in", ["padding-bottom", "padding-left", "pad ding-right", "padding-top"]) | |
|
shend
2017/05/03 05:18:12
same here.
nainar
2017/05/03 06:49:57
Done.
| |
| 65 |list | |
| 66 )|indent(2)}} | |
| 67 return false; | |
| 68 } | |
| 69 | |
| 51 } // namespace blink | 70 } // namespace blink |
| OLD | NEW |