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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 return; | 567 return; |
568 | 568 |
569 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 569 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
570 if (primitiveValue->getValueID() == {{id_for_minus_one}}) | 570 if (primitiveValue->getValueID() == {{id_for_minus_one}}) |
571 {{ set_value(property) }}(-1); | 571 {{ set_value(property) }}(-1); |
572 else | 572 else |
573 {{ set_value(property) }}(primitiveValue->getValue<{{property.type_name}
}>(CSSPrimitiveValue::CSS_NUMBER)); | 573 {{ set_value(property) }}(primitiveValue->getValue<{{property.type_name}
}>(CSSPrimitiveValue::CSS_NUMBER)); |
574 } | 574 } |
575 {%- endmacro %} | 575 {%- endmacro %} |
576 | 576 |
577 {{ apply_value_number("CSSPropertyWebkitHyphenateLimitAfter", "CSSValueAuto") }} | |
578 {{ apply_value_number("CSSPropertyWebkitHyphenateLimitBefore", "CSSValueAuto") }
} | |
579 {{ apply_value_number("CSSPropertyWebkitHyphenateLimitLines", "CSSValueNoLimit")
}} | |
580 {{ apply_value_number("CSSPropertyWebkitMarqueeRepetition", "CSSValueInfinite")
}} | 577 {{ apply_value_number("CSSPropertyWebkitMarqueeRepetition", "CSSValueInfinite")
}} |
581 | 578 |
582 {%- macro apply_value_shape(property_id) %} | 579 {%- macro apply_value_shape(property_id) %} |
583 {{ declare_value_function(property_id) }} | 580 {{ declare_value_function(property_id) }} |
584 { | 581 { |
585 {%- set property = properties[property_id] %} | 582 {%- set property = properties[property_id] %} |
586 if (value->isPrimitiveValue()) { | 583 if (value->isPrimitiveValue()) { |
587 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 584 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
588 if (primitiveValue->getValueID() == CSSValueAuto) | 585 if (primitiveValue->getValueID() == CSSValueAuto) |
589 {{ set_value(property) }}(0); | 586 {{ set_value(property) }}(0); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 } | 635 } |
639 {%- endmacro %} | 636 {%- endmacro %} |
640 | 637 |
641 {{ apply_value_string("CSSPropertyWebkitHighlight", "CSSValueNone") }} | 638 {{ apply_value_string("CSSPropertyWebkitHighlight", "CSSValueNone") }} |
642 {{ apply_value_string("CSSPropertyWebkitHyphenateCharacter", "CSSValueAuto") }} | 639 {{ apply_value_string("CSSPropertyWebkitHyphenateCharacter", "CSSValueAuto") }} |
643 {{ apply_value_string("CSSPropertyWebkitLineGrid", "CSSValueNone") }} | 640 {{ apply_value_string("CSSPropertyWebkitLineGrid", "CSSValueNone") }} |
644 {{ apply_value_string("CSSPropertyWebkitFlowFrom", "CSSValueNone") }} | 641 {{ apply_value_string("CSSPropertyWebkitFlowFrom", "CSSValueNone") }} |
645 {{ apply_value_string("CSSPropertyWebkitFlowInto", "CSSValueNone") }} | 642 {{ apply_value_string("CSSPropertyWebkitFlowInto", "CSSValueNone") }} |
646 | 643 |
647 } // namespace WebCore | 644 } // namespace WebCore |
OLD | NEW |