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

Unified Diff: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 645073003: Move special code for 'shape-outside' out of StyleBuilderFunctions.cpp.tmpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unreachable nullptr. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index c8eb5fb81eb4456583b6c3a3d7f374630f5d654c..6fbbdab1badd94e6ce58bbf9c96d25998e26dc0f 100644
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -509,42 +509,6 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{% endmacro %}
{{apply_value_number('CSSPropertyInternalMarqueeRepetition', 'CSSValueInfinite')}}
-{% macro apply_value_shape(property_id) %}
-{{declare_value_function(property_id)}}
-{
- {% set property = properties[property_id] %}
- if (value->isPrimitiveValue()) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueNone)
- {{set_value(property)}}(nullptr);
- } else if (value->isImageValue() || value->isImageGeneratorValue() || value->isImageSetValue()) {
- {{set_value(property)}}(ShapeValue::createImageValue(state.styleImage({{property_id}}, value)));
- } else if (value->isValueList()) {
- RefPtr<BasicShape> shape;
- CSSBoxType cssBox = BoxMissing;
- CSSValueList* valueList = toCSSValueList(value);
- for (unsigned i = 0; i < valueList->length(); ++i) {
- CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->item(i));
- if (primitiveValue->isShape())
- shape = basicShapeForValue(state, primitiveValue->getShapeValue());
- else if (primitiveValue->getValueID() == CSSValueContentBox
- || primitiveValue->getValueID() == CSSValueBorderBox
- || primitiveValue->getValueID() == CSSValuePaddingBox
- || primitiveValue->getValueID() == CSSValueMarginBox)
- cssBox = CSSBoxType(*primitiveValue);
- else
- return;
- }
-
- if (shape)
- {{set_value(property)}}(ShapeValue::createShapeValue(shape.release(), cssBox));
- else if (cssBox != BoxMissing)
- {{set_value(property)}}(ShapeValue::createBoxShapeValue(cssBox));
- }
-}
-{% endmacro %}
-{{apply_value_shape('CSSPropertyShapeOutside')}}
-
{% macro apply_alignment(property_id, alignment_type) %}
{% set property = properties[property_id] %}
{{declare_initial_function(property_id)}}
« no previous file with comments | « no previous file | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698