| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 {{apply_fill_layer('CSSPropertyWebkitMaskPositionY', 'YPosition')}} | 449 {{apply_fill_layer('CSSPropertyWebkitMaskPositionY', 'YPosition')}} |
| 450 {{apply_fill_layer('CSSPropertyWebkitMaskRepeatX', 'RepeatX')}} | 450 {{apply_fill_layer('CSSPropertyWebkitMaskRepeatX', 'RepeatX')}} |
| 451 {{apply_fill_layer('CSSPropertyWebkitMaskRepeatY', 'RepeatY')}} | 451 {{apply_fill_layer('CSSPropertyWebkitMaskRepeatY', 'RepeatY')}} |
| 452 {{apply_fill_layer('CSSPropertyWebkitMaskSize', 'Size', 'Size')}} | 452 {{apply_fill_layer('CSSPropertyWebkitMaskSize', 'Size', 'Size')}} |
| 453 | 453 |
| 454 {% macro apply_grid_template(property_id, type) %} | 454 {% macro apply_grid_template(property_id, type) %} |
| 455 {{declare_initial_function(property_id)}} { | 455 {{declare_initial_function(property_id)}} { |
| 456 state.Style()->SetGridTemplate{{type}}s(ComputedStyle::InitialGridTemplate{{ty
pe}}s()); | 456 state.Style()->SetGridTemplate{{type}}s(ComputedStyle::InitialGridTemplate{{ty
pe}}s()); |
| 457 state.Style()->SetNamedGrid{{type}}Lines(ComputedStyle::InitialNamedGrid{{type
}}Lines()); | 457 state.Style()->SetNamedGrid{{type}}Lines(ComputedStyle::InitialNamedGrid{{type
}}Lines()); |
| 458 state.Style()->SetOrderedNamedGrid{{type}}Lines(ComputedStyle::InitialOrderedN
amedGrid{{type}}Lines()); | 458 state.Style()->SetOrderedNamedGrid{{type}}Lines(ComputedStyle::InitialOrderedN
amedGrid{{type}}Lines()); |
| 459 state.Style()->SetGridAutoRepeat{{type}}s(ComputedStyle::InitialGridAutoRepeat
Tracks()); |
| 460 state.Style()->SetGridAutoRepeat{{type}}sInsertionPoint(ComputedStyle::Initial
GridAutoRepeatInsertionPoint()); |
| 461 state.Style()->SetAutoRepeatNamedGrid{{type}}Lines(ComputedStyle::InitialNamed
Grid{{type}}Lines()); |
| 462 state.Style()->SetAutoRepeatOrderedNamedGrid{{type}}Lines(ComputedStyle::Initi
alOrderedNamedGrid{{type}}Lines()); |
| 463 state.Style()->SetGridAutoRepeat{{type}}sType(ComputedStyle::InitialGridAutoRe
peatType()); |
| 464 |
| 459 } | 465 } |
| 460 | 466 |
| 461 {{declare_inherit_function(property_id)}} { | 467 {{declare_inherit_function(property_id)}} { |
| 462 state.Style()->SetGridTemplate{{type}}s(state.ParentStyle()->GridTemplate{{typ
e}}s()); | 468 state.Style()->SetGridTemplate{{type}}s(state.ParentStyle()->GridTemplate{{typ
e}}s()); |
| 463 state.Style()->SetNamedGrid{{type}}Lines(state.ParentStyle()->NamedGrid{{type}
}Lines()); | 469 state.Style()->SetNamedGrid{{type}}Lines(state.ParentStyle()->NamedGrid{{type}
}Lines()); |
| 464 state.Style()->SetOrderedNamedGrid{{type}}Lines(state.ParentStyle()->OrderedNa
medGrid{{type}}Lines()); | 470 state.Style()->SetOrderedNamedGrid{{type}}Lines(state.ParentStyle()->OrderedNa
medGrid{{type}}Lines()); |
| 471 state.Style()->SetGridAutoRepeat{{type}}s(state.ParentStyle()->GridAutoRepeat{
{type}}s()); |
| 472 state.Style()->SetGridAutoRepeat{{type}}sInsertionPoint(state.ParentStyle()->G
ridAutoRepeat{{type}}sInsertionPoint()); |
| 473 state.Style()->SetAutoRepeatNamedGrid{{type}}Lines(state.ParentStyle()->AutoRe
peatNamedGrid{{type}}Lines()); |
| 474 state.Style()->SetAutoRepeatOrderedNamedGrid{{type}}Lines(state.ParentStyle()-
>AutoRepeatOrderedNamedGrid{{type}}Lines()); |
| 475 state.Style()->SetGridAutoRepeat{{type}}sType(state.ParentStyle()->GridAutoRep
eat{{type}}sType()); |
| 465 } | 476 } |
| 466 | 477 |
| 467 {{declare_value_function(property_id)}} { | 478 {{declare_value_function(property_id)}} { |
| 468 Vector<GridTrackSize> trackSizes; | 479 Vector<GridTrackSize> trackSizes; |
| 469 Vector<GridTrackSize> autoRepeatTrackSizes; | 480 Vector<GridTrackSize> autoRepeatTrackSizes; |
| 470 NamedGridLinesMap namedGridLines; | 481 NamedGridLinesMap namedGridLines; |
| 471 OrderedNamedGridLines orderedNamedGridLines; | 482 OrderedNamedGridLines orderedNamedGridLines; |
| 472 NamedGridLinesMap autoRepeatNamedGridLines; | 483 NamedGridLinesMap autoRepeatNamedGridLines; |
| 473 OrderedNamedGridLines autoRepeatOrderedNamedGridLines; | 484 OrderedNamedGridLines autoRepeatOrderedNamedGridLines; |
| 474 AutoRepeatType autoRepeatType = ComputedStyle::InitialGridAutoRepeatType(); | 485 AutoRepeatType autoRepeatType = ComputedStyle::InitialGridAutoRepeatType(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 : SVG_PAINTTYPE_URI_RGBCOLOR; | 560 : SVG_PAINTTYPE_URI_RGBCOLOR; |
| 550 } | 561 } |
| 551 {{set_value(property)}}(paintType, color, url, | 562 {{set_value(property)}}(paintType, color, url, |
| 552 state.ApplyPropertyToRegularStyle(), | 563 state.ApplyPropertyToRegularStyle(), |
| 553 state.ApplyPropertyToVisitedLinkStyle()); | 564 state.ApplyPropertyToVisitedLinkStyle()); |
| 554 } | 565 } |
| 555 {% endmacro %} | 566 {% endmacro %} |
| 556 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} | 567 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} |
| 557 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} | 568 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} |
| 558 } // namespace blink | 569 } // namespace blink |
| OLD | NEW |