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

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

Issue 547273002: Make currentColor behave the same internally as initial (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698