diff options
Diffstat (limited to 'Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp')
-rw-r--r-- | Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp b/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp index 5dfe03e..0cf6181 100644 --- a/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp @@ -27,7 +27,6 @@ #include "CSSPropertyNames.h" #include "Document.h" #include "RenderStyle.h" -#include "SVGPaint.h" namespace WebCore { @@ -60,14 +59,6 @@ static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength return list.release(); } -PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const -{ - RefPtr<SVGPaint> paint = newPaint; - if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR) - paint->setColor(style->color()); - return paint.release(); -} - PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const { Node* node = m_node.get(); @@ -136,13 +127,13 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int pro return CSSPrimitiveValue::create(svgStyle->filterResource(), CSSPrimitiveValue::CSS_URI); return CSSPrimitiveValue::createIdentifier(CSSValueNone); case CSSPropertyFloodColor: - return currentColorOrValidColor(style, svgStyle->floodColor()); + return CSSPrimitiveValue::createColor(svgStyle->floodColor().rgb()); case CSSPropertyLightingColor: - return currentColorOrValidColor(style, svgStyle->lightingColor()); + return CSSPrimitiveValue::createColor(svgStyle->lightingColor().rgb()); case CSSPropertyStopColor: - return currentColorOrValidColor(style, svgStyle->stopColor()); + return CSSPrimitiveValue::createColor(svgStyle->stopColor().rgb()); case CSSPropertyFill: - return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->fillPaintType(), svgStyle->fillPaintUri(), svgStyle->fillPaintColor()), style); + return svgStyle->fillPaint(); case CSSPropertyKerning: return SVGLength::toCSSPrimitiveValue(svgStyle->kerning()); case CSSPropertyMarkerEnd: @@ -158,7 +149,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int pro return CSSPrimitiveValue::create(svgStyle->markerStartResource(), CSSPrimitiveValue::CSS_URI); return CSSPrimitiveValue::createIdentifier(CSSValueNone); case CSSPropertyStroke: - return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->strokePaintType(), svgStyle->strokePaintUri(), svgStyle->strokePaintColor()), style); + return svgStyle->strokePaint(); case CSSPropertyStrokeDasharray: return strokeDashArrayToCSSValueList(svgStyle->strokeDashArray()); case CSSPropertyStrokeDashoffset: |