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

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

Issue 1909233002: Spec-compliant parsing and initial values for 'orphans' and 'widows'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some unit tests had non-conformant widphans assumptions too. Created 4 years, 8 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
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')}}
151 {{apply_auto('CSSPropertyColumnCount')}} 150 {{apply_auto('CSSPropertyColumnCount')}}
152 {{apply_auto('CSSPropertyColumnGap', auto_getter='hasNormalColumnGap', auto_sett er='setHasNormalColumnGap', auto_identity='CSSValueNormal')}} 151 {{apply_auto('CSSPropertyColumnGap', auto_getter='hasNormalColumnGap', auto_sett er='setHasNormalColumnGap', auto_identity='CSSValueNormal')}}
153 {{apply_auto('CSSPropertyColumnWidth')}} 152 {{apply_auto('CSSPropertyColumnWidth')}}
154 {{apply_auto('CSSPropertyWidows')}}
155 {{apply_auto('CSSPropertyZIndex')}} 153 {{apply_auto('CSSPropertyZIndex')}}
156 154
157 static bool lengthMatchesAllSides(const LengthBox& lengthBox, const Length& leng th) 155 static bool lengthMatchesAllSides(const LengthBox& lengthBox, const Length& leng th)
158 { 156 {
159 return (lengthBox.left() == length 157 return (lengthBox.left() == length
160 && lengthBox.right() == length 158 && lengthBox.right() == length
161 && lengthBox.top() == length 159 && lengthBox.top() == length
162 && lengthBox.bottom() == length); 160 && lengthBox.bottom() == length);
163 } 161 }
164 162
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R GBCOLOR; 533 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R GBCOLOR;
536 } 534 }
537 {{set_value(property)}}(paintType, color, url, 535 {{set_value(property)}}(paintType, color, url,
538 state.applyPropertyToRegularStyle(), 536 state.applyPropertyToRegularStyle(),
539 state.applyPropertyToVisitedLinkStyle()); 537 state.applyPropertyToVisitedLinkStyle());
540 } 538 }
541 {% endmacro %} 539 {% endmacro %}
542 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 540 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
543 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 541 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
544 } // namespace blink 542 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698