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

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

Issue 303473009: Fix setting shape-outside: none (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 {% endmacro %} 473 {% endmacro %}
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() == CSSValueNone)
483 {{set_value(property)}}(nullptr); 483 {{set_value(property)}}(nullptr);
484 } else if (value->isImageValue() || value->isImageGeneratorValue() || value- >isImageSetValue()) { 484 } else if (value->isImageValue() || value->isImageGeneratorValue() || value- >isImageSetValue()) {
485 {{set_value(property)}}(ShapeValue::createImageValue(state.styleImage({{ property_id}}, value))); 485 {{set_value(property)}}(ShapeValue::createImageValue(state.styleImage({{ property_id}}, value)));
486 } else if (value->isValueList()) { 486 } else if (value->isValueList()) {
487 RefPtr<BasicShape> shape; 487 RefPtr<BasicShape> shape;
488 CSSBoxType cssBox = BoxMissing; 488 CSSBoxType cssBox = BoxMissing;
489 CSSValueList* valueList = toCSSValueList(value); 489 CSSValueList* valueList = toCSSValueList(value);
490 for (unsigned i = 0; i < valueList->length(); ++i) { 490 for (unsigned i = 0; i < valueList->length(); ++i) {
491 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->i temWithoutBoundsCheck(i)); 491 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->i temWithoutBoundsCheck(i));
492 if (primitiveValue->isShape()) 492 if (primitiveValue->isShape())
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 color, 566 color,
567 svgPaint->uri(), 567 svgPaint->uri(),
568 state.applyPropertyToRegularStyle(), 568 state.applyPropertyToRegularStyle(),
569 state.applyPropertyToVisitedLinkStyle()); 569 state.applyPropertyToVisitedLinkStyle());
570 } 570 }
571 } 571 }
572 {% endmacro %} 572 {% endmacro %}
573 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 573 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
574 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 574 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
575 } // namespace WebCore 575 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698