Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 23601011: Have StyleResolver / StyleResolverState deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update StyleResolverState as well Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698