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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 if (!parentData) | 92 if (!parentData) |
93 applyInitial{{property_id}}(state); | 93 applyInitial{{property_id}}(state); |
94 else | 94 else |
95 state.style()->access{{animation}}s().{{vector}} = parentData->{{vector}
}; | 95 state.style()->access{{animation}}s().{{vector}} = parentData->{{vector}
}; |
96 } | 96 } |
97 | 97 |
98 {{declare_value_function(property_id)}} | 98 {{declare_value_function(property_id)}} |
99 { | 99 { |
100 CSS{{animation}}Data& data = state.style()->access{{animation}}s(); | 100 CSS{{animation}}Data& data = state.style()->access{{animation}}s(); |
101 data.{{vector}}.clear(); | 101 data.{{vector}}.clear(); |
102 if (value->isValueList()) { | 102 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) |
103 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) | 103 data.{{vector}}.append(state.styleMap().mapAnimation{{attribute}}(i.valu
e())); |
104 data.{{vector}}.append(state.styleMap().mapAnimation{{attribute}}(i.
value())); | |
105 } else { | |
106 data.{{vector}}.append(state.styleMap().mapAnimation{{attribute}}(value)
); | |
107 } | |
108 } | 104 } |
109 {% endmacro %} | 105 {% endmacro %} |
110 {{apply_animation('CSSPropertyWebkitAnimationDelay', 'Delay', 'Animation')}} | 106 {{apply_animation('CSSPropertyWebkitAnimationDelay', 'Delay', 'Animation')}} |
111 {{apply_animation('CSSPropertyWebkitAnimationDirection', 'Direction', 'Animation
')}} | 107 {{apply_animation('CSSPropertyWebkitAnimationDirection', 'Direction', 'Animation
')}} |
112 {{apply_animation('CSSPropertyWebkitAnimationDuration', 'Duration', 'Animation')
}} | 108 {{apply_animation('CSSPropertyWebkitAnimationDuration', 'Duration', 'Animation')
}} |
113 {{apply_animation('CSSPropertyWebkitAnimationFillMode', 'FillMode', 'Animation')
}} | 109 {{apply_animation('CSSPropertyWebkitAnimationFillMode', 'FillMode', 'Animation')
}} |
114 {{apply_animation('CSSPropertyWebkitAnimationIterationCount', 'IterationCount',
'Animation')}} | 110 {{apply_animation('CSSPropertyWebkitAnimationIterationCount', 'IterationCount',
'Animation')}} |
115 {{apply_animation('CSSPropertyWebkitAnimationName', 'Name', 'Animation')}} | 111 {{apply_animation('CSSPropertyWebkitAnimationName', 'Name', 'Animation')}} |
116 {{apply_animation('CSSPropertyWebkitAnimationPlayState', 'PlayState', 'Animation
')}} | 112 {{apply_animation('CSSPropertyWebkitAnimationPlayState', 'PlayState', 'Animation
')}} |
117 {{apply_animation('CSSPropertyWebkitAnimationTimingFunction', 'TimingFunction',
'Animation')}} | 113 {{apply_animation('CSSPropertyWebkitAnimationTimingFunction', 'TimingFunction',
'Animation')}} |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 color, | 562 color, |
567 svgPaint->uri(), | 563 svgPaint->uri(), |
568 state.applyPropertyToRegularStyle(), | 564 state.applyPropertyToRegularStyle(), |
569 state.applyPropertyToVisitedLinkStyle()); | 565 state.applyPropertyToVisitedLinkStyle()); |
570 } | 566 } |
571 } | 567 } |
572 {% endmacro %} | 568 {% endmacro %} |
573 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 569 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
574 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 570 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
575 } // namespace WebCore | 571 } // namespace WebCore |
OLD | NEW |