Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 1387113002: Change StyleResolverState.styleImage() to take a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs to replace the members with const members Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698