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

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

Issue 64293008: Wrap CSS length conversion arguments in an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: don't make it noncopyable ; clang doesn't do the RVO stuffs? Created 7 years 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
« no previous file with comments | « no previous file | Source/core/animation/AnimatableLength.h » ('j') | 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimatableLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698