| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {# | 2 {# |
| 3 This file is for property handlers which use the templating engine to | 3 This file is for property handlers which use the templating engine to |
| 4 reduce (handwritten) code duplication. | 4 reduce (handwritten) code duplication. |
| 5 | 5 |
| 6 The `properties' dict can be used to access a property's parameters in | 6 The `properties' dict can be used to access a property's parameters in |
| 7 jinja2 templates (i.e. setter, getter, initial, type_name) | 7 jinja2 templates (i.e. setter, getter, initial, type_name) |
| 8 #} | 8 #} |
| 9 #include "config.h" | 9 #include "config.h" |
| 10 #include "StyleBuilderFunctions.h" | 10 #include "StyleBuilderFunctions.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return; | 136 return; |
| 137 | 137 |
| 138 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 138 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 139 if (primitiveValue->getValueID() == {{auto_identity}}) | 139 if (primitiveValue->getValueID() == {{auto_identity}}) |
| 140 state.style()->{{auto_setter}}(); | 140 state.style()->{{auto_setter}}(); |
| 141 else | 141 else |
| 142 {{convert_and_set_value(property)}} | 142 {{convert_and_set_value(property)}} |
| 143 } | 143 } |
| 144 {% endmacro %} | 144 {% endmacro %} |
| 145 {{apply_auto('CSSPropertyClip')}} | 145 {{apply_auto('CSSPropertyClip')}} |
| 146 {{apply_auto('CSSPropertyOrphans')}} | |
| 147 {{apply_auto('CSSPropertyWidows')}} | 146 {{apply_auto('CSSPropertyWidows')}} |
| 148 {{apply_auto('CSSPropertyZIndex')}} | 147 {{apply_auto('CSSPropertyZIndex')}} |
| 149 | 148 |
| 150 static bool lengthTypeAndValueMatch(const Length& length, LengthType type, float
value) | 149 static bool lengthTypeAndValueMatch(const Length& length, LengthType type, float
value) |
| 151 { | 150 { |
| 152 return length.type() == type && length.value() == value; | 151 return length.type() == type && length.value() == value; |
| 153 } | 152 } |
| 154 | 153 |
| 155 static bool lengthTypeAndValueMatch(const LengthBox& lengthBox, LengthType type,
float value) | 154 static bool lengthTypeAndValueMatch(const LengthBox& lengthBox, LengthType type,
float value) |
| 156 { | 155 { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); | 441 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); |
| 443 } else { | 442 } else { |
| 444 state.style()->set{{alignment_type}}(*primitiveValue); | 443 state.style()->set{{alignment_type}}(*primitiveValue); |
| 445 } | 444 } |
| 446 } | 445 } |
| 447 {% endmacro %} | 446 {% endmacro %} |
| 448 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} | 447 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} |
| 449 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} | 448 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} |
| 450 | 449 |
| 451 } // namespace blink | 450 } // namespace blink |
| OLD | NEW |