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

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

Issue 20112002: Have const StyleResolverState return const RenderStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/css/resolver/StyleResolverState.h ('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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 {{ apply_auto("CSSPropertyZIndex") }} 146 {{ apply_auto("CSSPropertyZIndex") }}
147 147
148 {%- macro apply_value_border_image(property_id) %} 148 {%- macro apply_value_border_image(property_id) %}
149 {{ declare_value_function(property_id) }} 149 {{ declare_value_function(property_id) }}
150 { 150 {
151 {%- set property = properties[property_id] %} 151 {%- set property = properties[property_id] %}
152 NinePieceImage image; 152 NinePieceImage image;
153 {%- if property_id == "CSSPropertyWebkitMaskBoxImage" %} 153 {%- if property_id == "CSSPropertyWebkitMaskBoxImage" %}
154 image.setMaskDefaults(); 154 image.setMaskDefaults();
155 {%- endif %} 155 {%- endif %}
156 state.styleMap().mapNinePieceImage({{property_id}}, value, image); 156 state.styleMap().mapNinePieceImage(state.style(), {{property_id}}, value, im age);
157 {{ set_value(property) }}(image); 157 {{ set_value(property) }}(image);
158 } 158 }
159 {%- endmacro %} 159 {%- endmacro %}
160 160
161 {{ apply_value_border_image("CSSPropertyWebkitBorderImage") }} 161 {{ apply_value_border_image("CSSPropertyWebkitBorderImage") }}
162 {{ apply_value_border_image("CSSPropertyWebkitMaskBoxImage") }} 162 {{ apply_value_border_image("CSSPropertyWebkitMaskBoxImage") }}
163 163
164 {%- macro apply_border_image_modifier(property_id, modifier_type) %} 164 {%- macro apply_border_image_modifier(property_id, modifier_type) %}
165 {%- set is_mask_box = "MaskBox" in property_id %} 165 {%- set is_mask_box = "MaskBox" in property_id %}
166 {%- set getter = "maskBoxImage" if is_mask_box else "borderImage" %} 166 {%- set getter = "maskBoxImage" if is_mask_box else "borderImage" %}
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 } 638 }
639 {%- endmacro %} 639 {%- endmacro %}
640 640
641 {{ apply_value_string("CSSPropertyWebkitHighlight", "CSSValueNone") }} 641 {{ apply_value_string("CSSPropertyWebkitHighlight", "CSSValueNone") }}
642 {{ apply_value_string("CSSPropertyWebkitHyphenateCharacter", "CSSValueAuto") }} 642 {{ apply_value_string("CSSPropertyWebkitHyphenateCharacter", "CSSValueAuto") }}
643 {{ apply_value_string("CSSPropertyWebkitLineGrid", "CSSValueNone") }} 643 {{ apply_value_string("CSSPropertyWebkitLineGrid", "CSSValueNone") }}
644 {{ apply_value_string("CSSPropertyWebkitFlowFrom", "CSSValueNone") }} 644 {{ apply_value_string("CSSPropertyWebkitFlowFrom", "CSSValueNone") }}
645 {{ apply_value_string("CSSPropertyWebkitFlowInto", "CSSValueNone") }} 645 {{ apply_value_string("CSSPropertyWebkitFlowInto", "CSSValueNone") }}
646 646
647 } // namespace WebCore 647 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698