| 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 5e050cd7da317259b27de230e895c28afd3c25ba..777442998fe9072e0bcd6432d2d1f240d21d1d92 100644
|
| --- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| +++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| @@ -13,6 +13,7 @@
|
| #include "core/css/BasicShapeFunctions.h"
|
| #include "core/css/CSSContentDistributionValue.h"
|
| #include "core/css/CSSPrimitiveValueMappings.h"
|
| +#include "core/css/CSSStringValue.h"
|
| #include "core/css/CSSValuePair.h"
|
| #include "core/css/resolver/StyleResolverState.h"
|
|
|
| @@ -347,7 +348,7 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| int length = list ? list->length() : 0;
|
| for (int i = 0; i < length; ++i) {
|
| const CSSValuePair* pair = toCSSValuePair(list->item(i));
|
| - AtomicString identifier(toCSSPrimitiveValue(pair->first())->getStringValue());
|
| + AtomicString identifier(toCSSStringValue(pair->first())->getStringValue());
|
| int value = toCSSPrimitiveValue(pair->second())->getIntValue();
|
| CounterDirectives& directives = map.add(identifier, CounterDirectives()).storedValue->value;
|
| {% if action == 'Reset' %}
|
| @@ -504,24 +505,27 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| if (value->isValueList()) {
|
| CSSValueList* list = toCSSValueList(value);
|
| ASSERT(list->length() == 2);
|
| - url = toCSSPrimitiveValue(list->item(0))->getStringValue();
|
| + url = toCSSStringValue(list->item(0))->getStringValue();
|
| value = list->item(1);
|
| }
|
|
|
| - CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
|
| Color color;
|
| SVGPaintType paintType = SVG_PAINTTYPE_RGBCOLOR;
|
| - if (primitiveValue->getValueID() == CSSValueNone) {
|
| - paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
|
| - } else if (primitiveValue->isURI()) {
|
| + if (value->isStringValue()) {
|
| + ASSERT(toCSSStringValue(value)->serializationType() == CSSStringValue::SerializeAsURI);
|
| paintType = SVG_PAINTTYPE_URI;
|
| - url = primitiveValue->getStringValue();
|
| - } else if (primitiveValue->getValueID() == CSSValueCurrentcolor) {
|
| - color = state.style()->color();
|
| - paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
|
| + url = toCSSStringValue(value)->getStringValue();
|
| } else {
|
| - color = StyleBuilderConverter::convertColor(state, primitiveValue);
|
| - paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
|
| + CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
|
| + if (primitiveValue->getValueID() == CSSValueNone) {
|
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
|
| + } else if (primitiveValue->getValueID() == CSSValueCurrentcolor) {
|
| + color = state.style()->color();
|
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
|
| + } else {
|
| + color = StyleBuilderConverter::convertColor(state, primitiveValue);
|
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
|
| + }
|
| }
|
| {{set_value(property)}}(paintType, color, url,
|
| state.applyPropertyToRegularStyle(),
|
|
|