| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 return; | 340 return; |
| 341 } | 341 } |
| 342 | 342 |
| 343 CounterDirectiveMap& map = state.style()->accessCounterDirectives(); | 343 CounterDirectiveMap& map = state.style()->accessCounterDirectives(); |
| 344 | 344 |
| 345 CSSValueList* list = toCSSValueList(value); | 345 CSSValueList* list = toCSSValueList(value); |
| 346 | 346 |
| 347 int length = list ? list->length() : 0; | 347 int length = list ? list->length() : 0; |
| 348 for (int i = 0; i < length; ++i) { | 348 for (int i = 0; i < length; ++i) { |
| 349 const CSSValuePair* pair = toCSSValuePair(list->item(i)); | 349 const CSSValuePair* pair = toCSSValuePair(list->item(i)); |
| 350 AtomicString identifier(toCSSPrimitiveValue(pair->first())->getStringVal
ue()); | 350 AtomicString identifier(toCSSPrimitiveValue(pair->first()).getStringValu
e()); |
| 351 int value = toCSSPrimitiveValue(pair->second())->getIntValue(); | 351 int value = toCSSPrimitiveValue(pair->second()).getIntValue(); |
| 352 CounterDirectives& directives = map.add(identifier, CounterDirectives())
.storedValue->value; | 352 CounterDirectives& directives = map.add(identifier, CounterDirectives())
.storedValue->value; |
| 353 {% if action == 'Reset' %} | 353 {% if action == 'Reset' %} |
| 354 directives.setResetValue(value); | 354 directives.setResetValue(value); |
| 355 {% else %} | 355 {% else %} |
| 356 directives.addIncrementValue(value); | 356 directives.addIncrementValue(value); |
| 357 {% endif %} | 357 {% endif %} |
| 358 } | 358 } |
| 359 ASSERT(!map.isEmpty()); | 359 ASSERT(!map.isEmpty()); |
| 360 } | 360 } |
| 361 {% endmacro %} | 361 {% endmacro %} |
| (...skipping 162 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 |