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

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

Issue 100463004: Make calls to AtomicString(const String&) explicit in css/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MediaQuery::mediaType() return an AtomicString 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/css/CSSParser.h » ('j') | Source/core/css/MediaQuery.h » ('J')
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 int length = list ? list->length() : 0; 326 int length = list ? list->length() : 0;
327 for (int i = 0; i < length; ++i) { 327 for (int i = 0; i < length; ++i) {
328 CSSValue* currValue = list->itemWithoutBoundsCheck(i); 328 CSSValue* currValue = list->itemWithoutBoundsCheck(i);
329 if (!currValue->isPrimitiveValue()) 329 if (!currValue->isPrimitiveValue())
330 continue; 330 continue;
331 331
332 Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue(); 332 Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue();
333 if (!pair || !pair->first() || !pair->second()) 333 if (!pair || !pair->first() || !pair->second())
334 continue; 334 continue;
335 335
336 AtomicString identifier = pair->first()->getStringValue(); 336 AtomicString identifier(pair->first()->getStringValue());
337 int value = pair->second()->getIntValue(); 337 int value = pair->second()->getIntValue();
338 CounterDirectives& directives = map.add(identifier, CounterDirectives()) .iterator->value; 338 CounterDirectives& directives = map.add(identifier, CounterDirectives()) .iterator->value;
339 {%- if action == "Reset" %} 339 {%- if action == "Reset" %}
340 directives.setResetValue(value); 340 directives.setResetValue(value);
341 {%- else %} 341 {%- else %}
342 directives.addIncrementValue(value); 342 directives.addIncrementValue(value);
343 {%- endif %} 343 {%- endif %}
344 } 344 }
345 } 345 }
346 {%- endmacro %} 346 {%- endmacro %}
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 } else if (value->isImageValue()) { 504 } else if (value->isImageValue()) {
505 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value))); 505 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value)));
506 } 506 }
507 } 507 }
508 {%- endmacro %} 508 {%- endmacro %}
509 509
510 {{ apply_value_shape("CSSPropertyShapeInside") }} 510 {{ apply_value_shape("CSSPropertyShapeInside") }}
511 {{ apply_value_shape("CSSPropertyShapeOutside") }} 511 {{ apply_value_shape("CSSPropertyShapeOutside") }}
512 512
513 } // namespace WebCore 513 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSParser.h » ('j') | Source/core/css/MediaQuery.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698