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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 if (!value->isPrimitiveValue()) | 141 if (!value->isPrimitiveValue()) |
142 return; | 142 return; |
143 | 143 |
144 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 144 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
145 if (primitiveValue->getValueID() == {{auto_identity}}) | 145 if (primitiveValue->getValueID() == {{auto_identity}}) |
146 state.style()->{{auto_setter}}(); | 146 state.style()->{{auto_setter}}(); |
147 else | 147 else |
148 {{convert_and_set_value(property)}} | 148 {{convert_and_set_value(property)}} |
149 } | 149 } |
150 {% endmacro %} | 150 {% endmacro %} |
| 151 {{apply_auto('CSSPropertyClip')}} |
151 {{apply_auto('CSSPropertyOrphans')}} | 152 {{apply_auto('CSSPropertyOrphans')}} |
152 {{apply_auto('CSSPropertyWebkitColumnCount')}} | 153 {{apply_auto('CSSPropertyWebkitColumnCount')}} |
153 {{apply_auto('CSSPropertyWebkitColumnGap', auto_getter='hasNormalColumnGap', aut
o_setter='setHasNormalColumnGap', auto_identity='CSSValueNormal')}} | 154 {{apply_auto('CSSPropertyWebkitColumnGap', auto_getter='hasNormalColumnGap', aut
o_setter='setHasNormalColumnGap', auto_identity='CSSValueNormal')}} |
154 {{apply_auto('CSSPropertyWebkitColumnWidth')}} | 155 {{apply_auto('CSSPropertyWebkitColumnWidth')}} |
155 {{apply_auto('CSSPropertyWidows')}} | 156 {{apply_auto('CSSPropertyWidows')}} |
156 {{apply_auto('CSSPropertyZIndex')}} | 157 {{apply_auto('CSSPropertyZIndex')}} |
157 | 158 |
158 static bool lengthTypeAndValueMatch(const Length& length, LengthType type, float
value) | 159 static bool lengthTypeAndValueMatch(const Length& length, LengthType type, float
value) |
159 { | 160 { |
160 return length.type() == type && length.value() == value; | 161 return length.type() == type && length.value() == value; |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 } | 634 } |
634 {{set_value(property)}}(ptype, c, url, | 635 {{set_value(property)}}(ptype, c, url, |
635 state.applyPropertyToRegularStyle(), | 636 state.applyPropertyToRegularStyle(), |
636 state.applyPropertyToVisitedLinkStyle()); | 637 state.applyPropertyToVisitedLinkStyle()); |
637 } | 638 } |
638 } | 639 } |
639 {% endmacro %} | 640 {% endmacro %} |
640 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 641 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
641 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 642 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
642 } // namespace blink | 643 } // namespace blink |
OLD | NEW |