| OLD | NEW |
| 1 {% from "macros.tmpl" import lower_first -%} | 1 {% from "macros.tmpl" import lower_first -%} |
| 2 | 2 |
| 3 {# | 3 {# |
| 4 This file is for property handlers which use the templating engine to | 4 This file is for property handlers which use the templating engine to |
| 5 reduce (handwritten) code duplication. | 5 reduce (handwritten) code duplication. |
| 6 | 6 |
| 7 The `properties' dict can be used to access a property's parameters in | 7 The `properties' dict can be used to access a property's parameters in |
| 8 jinja2 templates (i.e. setter, getter, initial, type_name) | 8 jinja2 templates (i.e. setter, getter, initial, type_name) |
| 9 -#} | 9 -#} |
| 10 | 10 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 int length = list ? list->length() : 0; | 326 int length = list ? list->length() : 0; |
| 327 for (int i = 0; i < length; ++i) { | 327 for (int i = 0; i < length; ++i) { |
| 328 CSSValue* currValue = list->itemWithoutBoundsCheck(i); | 328 CSSValue* currValue = list->itemWithoutBoundsCheck(i); |
| 329 if (!currValue->isPrimitiveValue()) | 329 if (!currValue->isPrimitiveValue()) |
| 330 continue; | 330 continue; |
| 331 | 331 |
| 332 Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue(); | 332 Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue(); |
| 333 if (!pair || !pair->first() || !pair->second()) | 333 if (!pair || !pair->first() || !pair->second()) |
| 334 continue; | 334 continue; |
| 335 | 335 |
| 336 AtomicString identifier = pair->first()->getStringValue(); | 336 AtomicString identifier(pair->first()->getStringValue()); |
| 337 int value = pair->second()->getIntValue(); | 337 int value = pair->second()->getIntValue(); |
| 338 CounterDirectives& directives = map.add(identifier, CounterDirectives())
.iterator->value; | 338 CounterDirectives& directives = map.add(identifier, CounterDirectives())
.iterator->value; |
| 339 {%- if action == "Reset" %} | 339 {%- if action == "Reset" %} |
| 340 directives.setResetValue(value); | 340 directives.setResetValue(value); |
| 341 {%- else %} | 341 {%- else %} |
| 342 directives.addIncrementValue(value); | 342 directives.addIncrementValue(value); |
| 343 {%- endif %} | 343 {%- endif %} |
| 344 } | 344 } |
| 345 } | 345 } |
| 346 {%- endmacro %} | 346 {%- endmacro %} |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 } else if (value->isImageValue()) { | 504 } else if (value->isImageValue()) { |
| 505 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); | 505 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); |
| 506 } | 506 } |
| 507 } | 507 } |
| 508 {%- endmacro %} | 508 {%- endmacro %} |
| 509 | 509 |
| 510 {{ apply_value_shape("CSSPropertyShapeInside") }} | 510 {{ apply_value_shape("CSSPropertyShapeInside") }} |
| 511 {{ apply_value_shape("CSSPropertyShapeOutside") }} | 511 {{ apply_value_shape("CSSPropertyShapeOutside") }} |
| 512 | 512 |
| 513 } // namespace WebCore | 513 } // namespace WebCore |
| OLD | NEW |