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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 Color resolvedColor = color.resolve(state.parentStyle()->color()); | 298 Color resolvedColor = color.resolve(state.parentStyle()->color()); |
299 if (state.applyPropertyToRegularStyle()) | 299 if (state.applyPropertyToRegularStyle()) |
300 {{set_value(property)}}(resolvedColor); | 300 {{set_value(property)}}(resolvedColor); |
301 if (state.applyPropertyToVisitedLinkStyle()) | 301 if (state.applyPropertyToVisitedLinkStyle()) |
302 state.style()->{{visited_link_setter}}(resolvedColor); | 302 state.style()->{{visited_link_setter}}(resolvedColor); |
303 } | 303 } |
304 | 304 |
305 {{declare_value_function(property_id)}} | 305 {{declare_value_function(property_id)}} |
306 { | 306 { |
307 if (state.applyPropertyToRegularStyle()) | 307 if (state.applyPropertyToRegularStyle()) |
308 {{set_value(property)}}(StyleBuilderConverter::convertColor(state, value
)); | 308 {{set_value(property)}}(StyleBuilderConverter::convertStyleColor(state,
value)); |
309 if (state.applyPropertyToVisitedLinkStyle()) | 309 if (state.applyPropertyToVisitedLinkStyle()) |
310 state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertCol
or(state, value, true)); | 310 state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertSty
leColor(state, value, true)); |
311 } | 311 } |
312 {% endmacro %} | 312 {% endmacro %} |
313 {{apply_color('CSSPropertyBackgroundColor', initial_color='RenderStyle::initialB
ackgroundColor') }} | 313 {{apply_color('CSSPropertyBackgroundColor', initial_color='RenderStyle::initialB
ackgroundColor') }} |
314 {{apply_color('CSSPropertyBorderBottomColor')}} | 314 {{apply_color('CSSPropertyBorderBottomColor')}} |
315 {{apply_color('CSSPropertyBorderLeftColor')}} | 315 {{apply_color('CSSPropertyBorderLeftColor')}} |
316 {{apply_color('CSSPropertyBorderRightColor')}} | 316 {{apply_color('CSSPropertyBorderRightColor')}} |
317 {{apply_color('CSSPropertyBorderTopColor')}} | 317 {{apply_color('CSSPropertyBorderTopColor')}} |
318 {{apply_color('CSSPropertyOutlineColor')}} | 318 {{apply_color('CSSPropertyOutlineColor')}} |
319 {{apply_color('CSSPropertyTextDecorationColor')}} | 319 {{apply_color('CSSPropertyTextDecorationColor')}} |
320 {{apply_color('CSSPropertyWebkitColumnRuleColor')}} | 320 {{apply_color('CSSPropertyWebkitColumnRuleColor')}} |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 634 } |
635 {{set_value(property)}}(ptype, c, url, | 635 {{set_value(property)}}(ptype, c, url, |
636 state.applyPropertyToRegularStyle(), | 636 state.applyPropertyToRegularStyle(), |
637 state.applyPropertyToVisitedLinkStyle()); | 637 state.applyPropertyToVisitedLinkStyle()); |
638 } | 638 } |
639 } | 639 } |
640 {% endmacro %} | 640 {% endmacro %} |
641 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 641 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
642 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 642 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
643 } // namespace blink | 643 } // namespace blink |
OLD | NEW |