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

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

Issue 1318543010: Change first() and second() in CSSPairValue to return const references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 5 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 | « no previous file | Source/core/animation/DeferredLegacyStyleInterpolation.cpp » ('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 license %} 1 {% from 'macros.tmpl' import license %}
2 {# 2 {#
3 This file is for property handlers which use the templating engine to 3 This file is for property handlers which use the templating engine to
4 reduce (handwritten) code duplication. 4 reduce (handwritten) code duplication.
5 5
6 The `properties' dict can be used to access a property's parameters in 6 The `properties' dict can be used to access a property's parameters in
7 jinja2 templates (i.e. setter, getter, initial, type_name) 7 jinja2 templates (i.e. setter, getter, initial, type_name)
8 #} 8 #}
9 #include "config.h" 9 #include "config.h"
10 #include "StyleBuilderFunctions.h" 10 #include "StyleBuilderFunctions.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return; 340 return;
341 } 341 }
342 342
343 CounterDirectiveMap& map = state.style()->accessCounterDirectives(); 343 CounterDirectiveMap& map = state.style()->accessCounterDirectives();
344 344
345 CSSValueList* list = toCSSValueList(value); 345 CSSValueList* list = toCSSValueList(value);
346 346
347 int length = list ? list->length() : 0; 347 int length = list ? list->length() : 0;
348 for (int i = 0; i < length; ++i) { 348 for (int i = 0; i < length; ++i) {
349 const CSSValuePair* pair = toCSSValuePair(list->item(i)); 349 const CSSValuePair* pair = toCSSValuePair(list->item(i));
350 AtomicString identifier(toCSSPrimitiveValue(pair->first())->getStringVal ue()); 350 AtomicString identifier(toCSSPrimitiveValue(pair->first()).getStringValu e());
351 int value = toCSSPrimitiveValue(pair->second())->getIntValue(); 351 int value = toCSSPrimitiveValue(pair->second()).getIntValue();
352 CounterDirectives& directives = map.add(identifier, CounterDirectives()) .storedValue->value; 352 CounterDirectives& directives = map.add(identifier, CounterDirectives()) .storedValue->value;
353 {% if action == 'Reset' %} 353 {% if action == 'Reset' %}
354 directives.setResetValue(value); 354 directives.setResetValue(value);
355 {% else %} 355 {% else %}
356 directives.addIncrementValue(value); 356 directives.addIncrementValue(value);
357 {% endif %} 357 {% endif %}
358 } 358 }
359 ASSERT(!map.isEmpty()); 359 ASSERT(!map.isEmpty());
360 } 360 }
361 {% endmacro %} 361 {% endmacro %}
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R GBCOLOR; 524 paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_R GBCOLOR;
525 } 525 }
526 {{set_value(property)}}(paintType, color, url, 526 {{set_value(property)}}(paintType, color, url,
527 state.applyPropertyToRegularStyle(), 527 state.applyPropertyToRegularStyle(),
528 state.applyPropertyToVisitedLinkStyle()); 528 state.applyPropertyToVisitedLinkStyle());
529 } 529 }
530 {% endmacro %} 530 {% endmacro %}
531 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 531 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
532 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 532 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
533 } // namespace blink 533 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/DeferredLegacyStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698