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

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

Issue 226323002: [CSS Shapes] Remove outside-shape CSS value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 {{ apply_value_number("CSSPropertyInternalMarqueeRepetition", "CSSValueInfinite" ) }} 444 {{ apply_value_number("CSSPropertyInternalMarqueeRepetition", "CSSValueInfinite" ) }}
445 445
446 {%- macro apply_value_shape(property_id) %} 446 {%- macro apply_value_shape(property_id) %}
447 {{ declare_value_function(property_id) }} 447 {{ declare_value_function(property_id) }}
448 { 448 {
449 {%- set property = properties[property_id] %} 449 {%- set property = properties[property_id] %}
450 if (value->isPrimitiveValue()) { 450 if (value->isPrimitiveValue()) {
451 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 451 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
452 if (primitiveValue->getValueID() == CSSValueAuto) 452 if (primitiveValue->getValueID() == CSSValueAuto)
453 {{ set_value(property) }}(nullptr); 453 {{ set_value(property) }}(nullptr);
454 else if (primitiveValue->getValueID() == CSSValueOutsideShape)
455 {{ set_value(property) }}(ShapeValue::createOutsideValue());
456 } else if (value->isImageValue() || value->isImageSetValue()) { 454 } else if (value->isImageValue() || value->isImageSetValue()) {
457 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value))); 455 {{ set_value(property) }}(ShapeValue::createImageValue(state.styleImage( {{property_id}}, value)));
458 } else if (value->isValueList()) { 456 } else if (value->isValueList()) {
459 RefPtr<BasicShape> shape; 457 RefPtr<BasicShape> shape;
460 CSSBoxType cssBox = BoxMissing; 458 CSSBoxType cssBox = BoxMissing;
461 CSSValueList* valueList = toCSSValueList(value); 459 CSSValueList* valueList = toCSSValueList(value);
462 for (unsigned i = 0; i < valueList->length(); ++i) { 460 for (unsigned i = 0; i < valueList->length(); ++i) {
463 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->i temWithoutBoundsCheck(i)); 461 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->i temWithoutBoundsCheck(i));
464 if (primitiveValue->isShape()) 462 if (primitiveValue->isShape())
465 shape = basicShapeForValue(state, primitiveValue->getShapeValue( )); 463 shape = basicShapeForValue(state, primitiveValue->getShapeValue( ));
(...skipping 10 matching lines...) Expand all
476 {{ set_value(property) }}(ShapeValue::createShapeValue(shape.release (), cssBox)); 474 {{ set_value(property) }}(ShapeValue::createShapeValue(shape.release (), cssBox));
477 else if (cssBox != BoxMissing) 475 else if (cssBox != BoxMissing)
478 {{ set_value(property) }}(ShapeValue::createBoxShapeValue(cssBox)); 476 {{ set_value(property) }}(ShapeValue::createBoxShapeValue(cssBox));
479 } 477 }
480 } 478 }
481 {%- endmacro %} 479 {%- endmacro %}
482 480
483 {{ apply_value_shape("CSSPropertyShapeOutside") }} 481 {{ apply_value_shape("CSSPropertyShapeOutside") }}
484 482
485 } // namespace WebCore 483 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/shapes/parsing/parsing-shape-outside-expected.txt ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698