| 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 29c660e30ba771b0d339df77d4e8c0e124cbd314..9e8d9ad1d90e463d49061a0c9aee00a7e6c10d1f 100644
|
| --- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| +++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| @@ -520,32 +520,30 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| if (!list->item(0)->isPrimitiveValue())
|
| return;
|
|
|
| - CSSPrimitiveValue* pValue = toCSSPrimitiveValue(list->item(0));
|
| - if (!pValue->isURI())
|
| + CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(list->item(0));
|
| + if (!primitiveValue->isURI())
|
| return;
|
|
|
| - url = pValue->getStringValue();
|
| + url = primitiveValue->getStringValue();
|
| value = list->item(1);
|
| }
|
| if (value->isPrimitiveValue()) {
|
| - CSSPrimitiveValue* pValue = toCSSPrimitiveValue(value);
|
| - Color c;
|
| - SVGPaintType ptype = SVG_PAINTTYPE_RGBCOLOR;
|
| - if (pValue->isRGBColor()) {
|
| - c = pValue->getRGBA32Value();
|
| - ptype = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
|
| - } else if (pValue->getValueID() == CSSValueCurrentcolor) {
|
| - c = state.style()->color();
|
| - ptype = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
|
| - } else if (pValue->getValueID() == CSSValueNone) {
|
| - ptype = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
|
| - } else if (pValue->isURI()) {
|
| - ptype = SVG_PAINTTYPE_URI;
|
| - url = pValue->getStringValue();
|
| + 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()) {
|
| + 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;
|
| } else {
|
| - return;
|
| + color = StyleBuilderConverter::convertColor(state, primitiveValue);
|
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
|
| }
|
| - {{set_value(property)}}(ptype, c, url,
|
| + {{set_value(property)}}(paintType, color, url,
|
| state.applyPropertyToRegularStyle(),
|
| state.applyPropertyToVisitedLinkStyle());
|
| }
|
|
|