| 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 "StyleBuilderFunctions.h" | 9 #include "StyleBuilderFunctions.h" |
| 10 | 10 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 /* Reset any remaining layers to not have the property set. */ | 363 /* Reset any remaining layers to not have the property set. */ |
| 364 currChild->clear{{fill_type}}(); | 364 currChild->clear{{fill_type}}(); |
| 365 currChild = currChild->next(); | 365 currChild = currChild->next(); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 {{declare_value_function(property_id)}} | 369 {{declare_value_function(property_id)}} |
| 370 { | 370 { |
| 371 FillLayer* currChild = &state.style()->{{access_layers}}(); | 371 FillLayer* currChild = &state.style()->{{access_layers}}(); |
| 372 FillLayer* prevChild = 0; | 372 FillLayer* prevChild = 0; |
| 373 if (value->isValueList() && !value->isImageSetValue()) { | 373 if (value->isValueList()) { |
| 374 /* Walk each value and put it into a layer, creating new layers as neede
d. */ | 374 /* Walk each value and put it into a layer, creating new layers as neede
d. */ |
| 375 CSSValueList* valueList = toCSSValueList(value); | 375 CSSValueList* valueList = toCSSValueList(value); |
| 376 for (unsigned int i = 0; i < valueList->length(); i++) { | 376 for (unsigned int i = 0; i < valueList->length(); i++) { |
| 377 if (!currChild) | 377 if (!currChild) |
| 378 currChild = prevChild->ensureNext(); | 378 currChild = prevChild->ensureNext(); |
| 379 state.styleMap().{{map_fill}}(currChild, valueList->item(i)); | 379 state.styleMap().{{map_fill}}(currChild, valueList->item(i)); |
| 380 prevChild = currChild; | 380 prevChild = currChild; |
| 381 currChild = currChild->next(); | 381 currChild = currChild->next(); |
| 382 } | 382 } |
| 383 } else { | 383 } else { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); | 439 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); |
| 440 } else { | 440 } else { |
| 441 state.style()->set{{alignment_type}}(*primitiveValue); | 441 state.style()->set{{alignment_type}}(*primitiveValue); |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 {% endmacro %} | 444 {% endmacro %} |
| 445 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} | 445 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} |
| 446 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} | 446 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} |
| 447 | 447 |
| 448 } // namespace blink | 448 } // namespace blink |
| OLD | NEW |