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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 if (Pair* pairValue = primitiveValue->getPairValue()) { | 512 if (Pair* pairValue = primitiveValue->getPairValue()) { |
513 state.style()->set{{alignment_type}}(*pairValue->first()); | 513 state.style()->set{{alignment_type}}(*pairValue->first()); |
514 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); | 514 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second
()); |
515 } else { | 515 } else { |
516 state.style()->set{{alignment_type}}(*primitiveValue); | 516 state.style()->set{{alignment_type}}(*primitiveValue); |
517 // FIXME: We should clear the overflow-alignment mode here and probably | 517 // FIXME: We should clear the overflow-alignment mode here and probably |
518 // also set it in the initial and inherit handlers | 518 // also set it in the initial and inherit handlers |
519 } | 519 } |
520 } | 520 } |
521 {% endmacro %} | 521 {% endmacro %} |
| 522 {{apply_alignment('CSSPropertyJustifyItems', 'JustifyItems')}} |
522 {{apply_alignment('CSSPropertyJustifySelf', 'JustifySelf')}} | 523 {{apply_alignment('CSSPropertyJustifySelf', 'JustifySelf')}} |
523 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} | 524 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} |
524 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} | 525 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} |
525 | 526 |
526 {% macro apply_svg_paint(property_id, paint_type) %} | 527 {% macro apply_svg_paint(property_id, paint_type) %} |
527 {% set property = properties[property_id] %} | 528 {% set property = properties[property_id] %} |
528 {{declare_initial_function(property_id)}} | 529 {{declare_initial_function(property_id)}} |
529 { | 530 { |
530 {{set_value(property)}}( | 531 {{set_value(property)}}( |
531 SVGRenderStyle::initial{{paint_type}}Type(), | 532 SVGRenderStyle::initial{{paint_type}}Type(), |
(...skipping 30 matching lines...) Expand all Loading... |
562 color, | 563 color, |
563 svgPaint->uri(), | 564 svgPaint->uri(), |
564 state.applyPropertyToRegularStyle(), | 565 state.applyPropertyToRegularStyle(), |
565 state.applyPropertyToVisitedLinkStyle()); | 566 state.applyPropertyToVisitedLinkStyle()); |
566 } | 567 } |
567 } | 568 } |
568 {% endmacro %} | 569 {% endmacro %} |
569 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 570 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
570 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 571 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
571 } // namespace WebCore | 572 } // namespace WebCore |
OLD | NEW |