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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 {{ declare_value_function(property_id) }} | 136 {{ declare_value_function(property_id) }} |
137 { | 137 { |
138 if (!value->isPrimitiveValue()) | 138 if (!value->isPrimitiveValue()) |
139 return; | 139 return; |
140 | 140 |
141 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 141 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
142 if (primitiveValue->getValueID() == {{auto_identity}}) | 142 if (primitiveValue->getValueID() == {{auto_identity}}) |
143 state.style()->{{auto_setter}}(); | 143 state.style()->{{auto_setter}}(); |
144 else | 144 else |
145 {%- if compute_length %} | 145 {%- if compute_length %} |
146 {{ set_value(property) }}(primitiveValue->computeLength<{{property.type_
name}}>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom())
); | 146 {{ set_value(property) }}(primitiveValue->computeLength<{{property.type_
name}}>(state.cssToLengthConversionData())); |
147 {%- else %} | 147 {%- else %} |
148 {{ set_value(property) }}(*primitiveValue); | 148 {{ set_value(property) }}(*primitiveValue); |
149 {%- endif %} | 149 {%- endif %} |
150 } | 150 } |
151 {%- endmacro %} | 151 {%- endmacro %} |
152 | 152 |
153 {{ apply_auto("CSSPropertyOrphans") }} | 153 {{ apply_auto("CSSPropertyOrphans") }} |
154 {{ apply_auto("CSSPropertyWebkitColumnCount") }} | 154 {{ apply_auto("CSSPropertyWebkitColumnCount") }} |
155 {{ apply_auto("CSSPropertyWebkitColumnGap", auto_getter="hasNormalColumnGap", au
to_setter="setHasNormalColumnGap", auto_identity="CSSValueNormal", compute_lengt
h=true) }} | 155 {{ apply_auto("CSSPropertyWebkitColumnGap", auto_getter="hasNormalColumnGap", au
to_setter="setHasNormalColumnGap", auto_identity="CSSValueNormal", compute_lengt
h=true) }} |
156 {{ apply_auto("CSSPropertyWebkitColumnWidth", compute_length=true) }} | 156 {{ apply_auto("CSSPropertyWebkitColumnWidth", compute_length=true) }} |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } else if (value->isImageValue()) { | 511 } else if (value->isImageValue()) { |
512 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); | 512 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); |
513 } | 513 } |
514 } | 514 } |
515 {%- endmacro %} | 515 {%- endmacro %} |
516 | 516 |
517 {{ apply_value_shape("CSSPropertyShapeInside") }} | 517 {{ apply_value_shape("CSSPropertyShapeInside") }} |
518 {{ apply_value_shape("CSSPropertyShapeOutside") }} | 518 {{ apply_value_shape("CSSPropertyShapeOutside") }} |
519 | 519 |
520 } // namespace WebCore | 520 } // namespace WebCore |
OLD | NEW |