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

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

Issue 1710003002: Unprefix multicol properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 years, 10 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 "StyleBuilderFunctions.h" 9 #include "StyleBuilderFunctions.h"
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 {{declare_value_function(property_id)}} 141 {{declare_value_function(property_id)}}
142 { 142 {
143 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == {{auto_identity}}) 143 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == {{auto_identity}})
144 state.style()->{{auto_setter}}(); 144 state.style()->{{auto_setter}}();
145 else 145 else
146 {{convert_and_set_value(property)}} 146 {{convert_and_set_value(property)}}
147 } 147 }
148 {% endmacro %} 148 {% endmacro %}
149 {{apply_auto('CSSPropertyClip')}} 149 {{apply_auto('CSSPropertyClip')}}
150 {{apply_auto('CSSPropertyOrphans')}} 150 {{apply_auto('CSSPropertyOrphans')}}
151 {{apply_auto('CSSPropertyWebkitColumnCount')}} 151 {{apply_auto('CSSPropertyColumnCount')}}
152 {{apply_auto('CSSPropertyWebkitColumnGap', auto_getter='hasNormalColumnGap', aut o_setter='setHasNormalColumnGap', auto_identity='CSSValueNormal')}} 152 {{apply_auto('CSSPropertyColumnGap', auto_getter='hasNormalColumnGap', auto_sett er='setHasNormalColumnGap', auto_identity='CSSValueNormal')}}
153 {{apply_auto('CSSPropertyWebkitColumnWidth')}} 153 {{apply_auto('CSSPropertyColumnWidth')}}
154 {{apply_auto('CSSPropertyWidows')}} 154 {{apply_auto('CSSPropertyWidows')}}
155 {{apply_auto('CSSPropertyZIndex')}} 155 {{apply_auto('CSSPropertyZIndex')}}
156 156
157 static bool lengthMatchesAllSides(const LengthBox& lengthBox, const Length& leng th) 157 static bool lengthMatchesAllSides(const LengthBox& lengthBox, const Length& leng th)
158 { 158 {
159 return (lengthBox.left() == length 159 return (lengthBox.left() == length
160 && lengthBox.right() == length 160 && lengthBox.right() == length
161 && lengthBox.top() == length 161 && lengthBox.top() == length
162 && lengthBox.bottom() == length); 162 && lengthBox.bottom() == length);
163 } 163 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertSty leColor(state, *value, true)); 297 state.style()->{{visited_link_setter}}(StyleBuilderConverter::convertSty leColor(state, *value, true));
298 } 298 }
299 {% endmacro %} 299 {% endmacro %}
300 {{apply_color('CSSPropertyBackgroundColor', initial_color='ComputedStyle::initia lBackgroundColor') }} 300 {{apply_color('CSSPropertyBackgroundColor', initial_color='ComputedStyle::initia lBackgroundColor') }}
301 {{apply_color('CSSPropertyBorderBottomColor')}} 301 {{apply_color('CSSPropertyBorderBottomColor')}}
302 {{apply_color('CSSPropertyBorderLeftColor')}} 302 {{apply_color('CSSPropertyBorderLeftColor')}}
303 {{apply_color('CSSPropertyBorderRightColor')}} 303 {{apply_color('CSSPropertyBorderRightColor')}}
304 {{apply_color('CSSPropertyBorderTopColor')}} 304 {{apply_color('CSSPropertyBorderTopColor')}}
305 {{apply_color('CSSPropertyOutlineColor')}} 305 {{apply_color('CSSPropertyOutlineColor')}}
306 {{apply_color('CSSPropertyTextDecorationColor')}} 306 {{apply_color('CSSPropertyTextDecorationColor')}}
307 {{apply_color('CSSPropertyWebkitColumnRuleColor')}} 307 {{apply_color('CSSPropertyColumnRuleColor')}}
308 {{apply_color('CSSPropertyWebkitTextEmphasisColor')}} 308 {{apply_color('CSSPropertyWebkitTextEmphasisColor')}}
309 {{apply_color('CSSPropertyWebkitTextFillColor')}} 309 {{apply_color('CSSPropertyWebkitTextFillColor')}}
310 {{apply_color('CSSPropertyWebkitTextStrokeColor')}} 310 {{apply_color('CSSPropertyWebkitTextStrokeColor')}}
311 311
312 {% macro apply_counter(property_id, action) %} 312 {% macro apply_counter(property_id, action) %}
313 {% set property = properties[property_id] %} 313 {% set property = properties[property_id] %}
314 {{declare_initial_function(property_id)}} { 314 {{declare_initial_function(property_id)}} {
315 state.style()->clear{{action}}Directives(); 315 state.style()->clear{{action}}Directives();
316 } 316 }
317 317
(...skipping 206 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