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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 state.style()->setOrderedNamedGrid{{type}}Lines(state.parentStyle()->ordered
NamedGrid{{type}}Lines()); | 439 state.style()->setOrderedNamedGrid{{type}}Lines(state.parentStyle()->ordered
NamedGrid{{type}}Lines()); |
440 } | 440 } |
441 | 441 |
442 {{declare_value_function(property_id)}} | 442 {{declare_value_function(property_id)}} |
443 { | 443 { |
444 Vector<GridTrackSize> trackSizes; | 444 Vector<GridTrackSize> trackSizes; |
445 NamedGridLinesMap namedGridLines; | 445 NamedGridLinesMap namedGridLines; |
446 OrderedNamedGridLines orderedNamedGridLines; | 446 OrderedNamedGridLines orderedNamedGridLines; |
447 if (!StyleBuilderConverter::convertGridTrackList(value, trackSizes, namedGri
dLines, orderedNamedGridLines, state)) | 447 if (!StyleBuilderConverter::convertGridTrackList(value, trackSizes, namedGri
dLines, orderedNamedGridLines, state)) |
448 return; | 448 return; |
| 449 const NamedGridAreaMap& namedGridAreas = state.style()->namedGridArea(); |
| 450 if (!namedGridAreas.isEmpty()) |
| 451 StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(namedGri
dAreas, namedGridLines, For{{type}}s); |
449 state.style()->setGridTemplate{{type}}s(trackSizes); | 452 state.style()->setGridTemplate{{type}}s(trackSizes); |
450 state.style()->setNamedGrid{{type}}Lines(namedGridLines); | 453 state.style()->setNamedGrid{{type}}Lines(namedGridLines); |
451 state.style()->setOrderedNamedGrid{{type}}Lines(orderedNamedGridLines); | 454 state.style()->setOrderedNamedGrid{{type}}Lines(orderedNamedGridLines); |
452 } | 455 } |
453 {% endmacro %} | 456 {% endmacro %} |
454 {{apply_grid_template('CSSPropertyGridTemplateColumns', 'Column')}} | 457 {{apply_grid_template('CSSPropertyGridTemplateColumns', 'Column')}} |
455 {{apply_grid_template('CSSPropertyGridTemplateRows', 'Row')}} | 458 {{apply_grid_template('CSSPropertyGridTemplateRows', 'Row')}} |
456 | 459 |
457 {% macro apply_value_number(property_id, id_for_minus_one) %} | 460 {% macro apply_value_number(property_id, id_for_minus_one) %} |
458 {{declare_value_function(property_id)}} | 461 {{declare_value_function(property_id)}} |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 502 |
500 if (shape) | 503 if (shape) |
501 {{set_value(property)}}(ShapeValue::createShapeValue(shape.release()
, cssBox)); | 504 {{set_value(property)}}(ShapeValue::createShapeValue(shape.release()
, cssBox)); |
502 else if (cssBox != BoxMissing) | 505 else if (cssBox != BoxMissing) |
503 {{set_value(property)}}(ShapeValue::createBoxShapeValue(cssBox)); | 506 {{set_value(property)}}(ShapeValue::createBoxShapeValue(cssBox)); |
504 } | 507 } |
505 } | 508 } |
506 {% endmacro %} | 509 {% endmacro %} |
507 {{apply_value_shape('CSSPropertyShapeOutside')}} | 510 {{apply_value_shape('CSSPropertyShapeOutside')}} |
508 } // namespace WebCore | 511 } // namespace WebCore |
OLD | NEW |