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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 275 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
276 | 276 |
277 {%- if inherit_color %} | 277 {%- if inherit_color %} |
278 if (primitiveValue->getValueID() == CSSValueCurrentcolor) { | 278 if (primitiveValue->getValueID() == CSSValueCurrentcolor) { |
279 applyInherit{{property_id}}(state); | 279 applyInherit{{property_id}}(state); |
280 return; | 280 return; |
281 } | 281 } |
282 {%- endif %} | 282 {%- endif %} |
283 | 283 |
284 if (state.applyPropertyToRegularStyle()) | 284 if (state.applyPropertyToRegularStyle()) |
285 {{ set_value(property) }}(state.document()->textLinkColors().colorFromPr
imitiveValue(primitiveValue)); | 285 {{ set_value(property) }}(state.document().textLinkColors().colorFromPri
mitiveValue(primitiveValue)); |
286 if (state.applyPropertyToVisitedLinkStyle()) | 286 if (state.applyPropertyToVisitedLinkStyle()) |
287 state.style()->{{visited_link_setter}}(state.document()->textLinkColors(
).colorFromPrimitiveValue(primitiveValue, state.element()->isLink() /* forVisite
dLink */)); | 287 state.style()->{{visited_link_setter}}(state.document().textLinkColors()
.colorFromPrimitiveValue(primitiveValue, state.element()->isLink() /* forVisited
Link */)); |
288 } | 288 } |
289 {%- endmacro %} | 289 {%- endmacro %} |
290 | 290 |
291 {{ apply_color("CSSPropertyBackgroundColor", default_getter="invalidColor") }} | 291 {{ apply_color("CSSPropertyBackgroundColor", default_getter="invalidColor") }} |
292 {{ apply_color("CSSPropertyBorderBottomColor") }} | 292 {{ apply_color("CSSPropertyBorderBottomColor") }} |
293 {{ apply_color("CSSPropertyBorderLeftColor") }} | 293 {{ apply_color("CSSPropertyBorderLeftColor") }} |
294 {{ apply_color("CSSPropertyBorderRightColor") }} | 294 {{ apply_color("CSSPropertyBorderRightColor") }} |
295 {{ apply_color("CSSPropertyBorderTopColor") }} | 295 {{ apply_color("CSSPropertyBorderTopColor") }} |
296 {{ apply_color("CSSPropertyColor", inherit_color=true, default_getter="invalidCo
lor", initial_color="RenderStyle::initialColor") }} | 296 {{ apply_color("CSSPropertyColor", inherit_color=true, default_getter="invalidCo
lor", initial_color="RenderStyle::initialColor") }} |
297 {{ apply_color("CSSPropertyOutlineColor") }} | 297 {{ apply_color("CSSPropertyOutlineColor") }} |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 } else if (value->isImageValue()) { | 507 } else if (value->isImageValue()) { |
508 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); | 508 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); |
509 } | 509 } |
510 } | 510 } |
511 {%- endmacro %} | 511 {%- endmacro %} |
512 | 512 |
513 {{ apply_value_shape("CSSPropertyWebkitShapeInside") }} | 513 {{ apply_value_shape("CSSPropertyWebkitShapeInside") }} |
514 {{ apply_value_shape("CSSPropertyWebkitShapeOutside") }} | 514 {{ apply_value_shape("CSSPropertyWebkitShapeOutside") }} |
515 | 515 |
516 } // namespace WebCore | 516 } // namespace WebCore |
OLD | NEW |