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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 {{ apply_value_number("CSSPropertyInternalMarqueeRepetition", "CSSValueInfinite" ) }} 474 {{ apply_value_number("CSSPropertyInternalMarqueeRepetition", "CSSValueInfinite" ) }}
475 475
476 {%- macro apply_value_shape(property_id) %} 476 {%- macro apply_value_shape(property_id) %}
477 {{ declare_value_function(property_id) }} 477 {{ declare_value_function(property_id) }}
478 { 478 {
479 {%- set property = properties[property_id] %} 479 {%- set property = properties[property_id] %}
480 if (value->isPrimitiveValue()) { 480 if (value->isPrimitiveValue()) {
481 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 481 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
482 if (primitiveValue->getValueID() == CSSValueAuto) 482 if (primitiveValue->getValueID() == CSSValueAuto)
483 {{ set_value(property) }}(0); 483 {{ set_value(property) }}(nullptr);
484 else if (primitiveValue->getValueID() == CSSValueMarginBox 484 else if (primitiveValue->getValueID() == CSSValueMarginBox
485 || primitiveValue->getValueID() == CSSValueBorderBox 485 || primitiveValue->getValueID() == CSSValueBorderBox
486 || primitiveValue->getValueID() == CSSValuePaddingBox 486 || primitiveValue->getValueID() == CSSValuePaddingBox
487 || primitiveValue->getValueID() == CSSValueContentBox) 487 || primitiveValue->getValueID() == CSSValueContentBox)
488 {{ set_value(property) }}(ShapeValue::createLayoutBoxValue(LayoutBox (*primitiveValue))); 488 {{ set_value(property) }}(ShapeValue::createLayoutBoxValue(LayoutBox (*primitiveValue)));
489 else if (primitiveValue->getValueID() == CSSValueOutsideShape) 489 else if (primitiveValue->getValueID() == CSSValueOutsideShape)
490 {{ set_value(property) }}(ShapeValue::createOutsideValue()); 490 {{ set_value(property) }}(ShapeValue::createOutsideValue());
491 else if (primitiveValue->isShape()) { 491 else if (primitiveValue->isShape()) {
492 {{ set_value(property) }}(ShapeValue::createShapeValue(basicShapeFor Value(state, primitiveValue->getShapeValue()))); 492 {{ set_value(property) }}(ShapeValue::createShapeValue(basicShapeFor Value(state, primitiveValue->getShapeValue())));
493 } 493 }
494 } else if (value->isImageValue() || value->isImageSetValue()) { 494 } else if (value->isImageValue() || value->isImageSetValue()) {
495 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value))); 495 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value)));
496 } 496 }
497 } 497 }
498 {%- endmacro %} 498 {%- endmacro %}
499 499
500 {{ apply_value_shape("CSSPropertyShapeInside") }} 500 {{ apply_value_shape("CSSPropertyShapeInside") }}
501 {{ apply_value_shape("CSSPropertyShapeOutside") }} 501 {{ apply_value_shape("CSSPropertyShapeOutside") }}
502 502
503 } // namespace WebCore 503 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/EventFactory.cpp.tmpl ('k') | Source/core/accessibility/AXImageMapLink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698