Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
| index 917785d4260092ee0c7085d49c8d7f626c05b24a..7bbdbd156fd0fed4bdb8b19c9f6b6d2e516bae22 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
| @@ -515,17 +515,14 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI |
| if (value->isURIValue()) { |
| paintType = SVG_PAINTTYPE_URI; |
| url = toCSSURIValue(value)->value(); |
| + } else if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone) { |
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE; |
| + } else if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueCurrentcolor) { |
|
alancutter (OOO until 2018)
2015/10/07 06:34:25
The old code wasn't checking isPrimitiveValue() so
sashab
2015/10/12 23:04:50
Unfortunately I have to write it this way, otherwi
|
| + color = state.style()->color(); |
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR; |
| } else { |
| - 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; |
| - } |
| + color = StyleBuilderConverter::convertColor(state, value); |
| + paintType = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR; |
| } |
| {{set_value(property)}}(paintType, color, url, |
| state.applyPropertyToRegularStyle(), |