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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 {{apply_border_image_modifier('CSSPropertyBorderImageWidth', 'Width')}} | 253 {{apply_border_image_modifier('CSSPropertyBorderImageWidth', 'Width')}} |
254 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageOutset', 'Outset')}} | 254 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageOutset', 'Outset')}} |
255 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageRepeat', 'Repeat')}} | 255 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageRepeat', 'Repeat')}} |
256 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageSlice', 'Slice')}} | 256 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageSlice', 'Slice')}} |
257 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageWidth', 'Width')}} | 257 {{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageWidth', 'Width')}} |
258 | 258 |
259 {% macro apply_value_border_image_source(property_id) %} | 259 {% macro apply_value_border_image_source(property_id) %} |
260 {{declare_value_function(property_id)}} | 260 {{declare_value_function(property_id)}} |
261 { | 261 { |
262 {% set property = properties[property_id] %} | 262 {% set property = properties[property_id] %} |
263 {{set_value(property)}}(state.styleImage({{property_id}}, value)); | 263 {{set_value(property)}}(state.styleImage({{property_id}}, *value)); |
264 } | 264 } |
265 {% endmacro %} | 265 {% endmacro %} |
266 {{apply_value_border_image_source('CSSPropertyBorderImageSource')}} | 266 {{apply_value_border_image_source('CSSPropertyBorderImageSource')}} |
267 {{apply_value_border_image_source('CSSPropertyWebkitMaskBoxImageSource')}} | 267 {{apply_value_border_image_source('CSSPropertyWebkitMaskBoxImageSource')}} |
268 | 268 |
269 {% macro apply_color(property_id, initial_color='StyleColor::currentColor') %} | 269 {% macro apply_color(property_id, initial_color='StyleColor::currentColor') %} |
270 {% set property = properties[property_id] %} | 270 {% set property = properties[property_id] %} |
271 {% set visited_link_setter = 'setVisitedLink' + property.name_for_methods %} | 271 {% set visited_link_setter = 'setVisitedLink' + property.name_for_methods %} |
272 {{declare_initial_function(property_id)}} | 272 {{declare_initial_function(property_id)}} |
273 { | 273 { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R
GBCOLOR; | 524 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R
GBCOLOR; |
525 } | 525 } |
526 {{set_value(property)}}(paintType, color, url, | 526 {{set_value(property)}}(paintType, color, url, |
527 state.applyPropertyToRegularStyle(), | 527 state.applyPropertyToRegularStyle(), |
528 state.applyPropertyToVisitedLinkStyle()); | 528 state.applyPropertyToVisitedLinkStyle()); |
529 } | 529 } |
530 {% endmacro %} | 530 {% endmacro %} |
531 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 531 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
532 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 532 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
533 } // namespace blink | 533 } // namespace blink |
OLD | NEW |