| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 state.style()->{{visited_link_setter}}(resolvedColor); | 257 state.style()->{{visited_link_setter}}(resolvedColor); |
| 258 } | 258 } |
| 259 | 259 |
| 260 {{ declare_value_function(property_id) }} | 260 {{ declare_value_function(property_id) }} |
| 261 { | 261 { |
| 262 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 262 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 263 | 263 |
| 264 if (state.applyPropertyToRegularStyle()) | 264 if (state.applyPropertyToRegularStyle()) |
| 265 {{ set_value(property) }}(state.document().textLinkColors().colorFromPri
mitiveValue(primitiveValue, state.style()->color())); | 265 {{ set_value(property) }}(state.document().textLinkColors().colorFromPri
mitiveValue(primitiveValue, state.style()->color())); |
| 266 if (state.applyPropertyToVisitedLinkStyle()) | 266 if (state.applyPropertyToVisitedLinkStyle()) |
| 267 state.style()->{{visited_link_setter}}(state.document().textLinkColors()
.colorFromPrimitiveValue(primitiveValue, state.style()->color(), state.element()
->isLink() /* forVisitedLink */)); | 267 state.style()->{{visited_link_setter}}(state.document().textLinkColors()
.colorFromPrimitiveValue(primitiveValue, state.style()->color(), true)); |
| 268 } | 268 } |
| 269 {%- endmacro %} | 269 {%- endmacro %} |
| 270 | 270 |
| 271 {{ apply_color("CSSPropertyBackgroundColor", initial_color="RenderStyle::initial
BackgroundColor") }} | 271 {{ apply_color("CSSPropertyBackgroundColor", initial_color="RenderStyle::initial
BackgroundColor") }} |
| 272 {{ apply_color("CSSPropertyBorderBottomColor") }} | 272 {{ apply_color("CSSPropertyBorderBottomColor") }} |
| 273 {{ apply_color("CSSPropertyBorderLeftColor") }} | 273 {{ apply_color("CSSPropertyBorderLeftColor") }} |
| 274 {{ apply_color("CSSPropertyBorderRightColor") }} | 274 {{ apply_color("CSSPropertyBorderRightColor") }} |
| 275 {{ apply_color("CSSPropertyBorderTopColor") }} | 275 {{ apply_color("CSSPropertyBorderTopColor") }} |
| 276 {{ apply_color("CSSPropertyOutlineColor") }} | 276 {{ apply_color("CSSPropertyOutlineColor") }} |
| 277 {{ apply_color("CSSPropertyTextDecorationColor") }} | 277 {{ apply_color("CSSPropertyTextDecorationColor") }} |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 } else if (value->isImageValue() || value->isImageSetValue()) { | 494 } else if (value->isImageValue() || value->isImageSetValue()) { |
| 495 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); | 495 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage(
{{property_id}}, value))); |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 {%- endmacro %} | 498 {%- endmacro %} |
| 499 | 499 |
| 500 {{ apply_value_shape("CSSPropertyShapeInside") }} | 500 {{ apply_value_shape("CSSPropertyShapeInside") }} |
| 501 {{ apply_value_shape("CSSPropertyShapeOutside") }} | 501 {{ apply_value_shape("CSSPropertyShapeOutside") }} |
| 502 | 502 |
| 503 } // namespace WebCore | 503 } // namespace WebCore |
| OLD | NEW |