Index: Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp |
=================================================================== |
--- Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (revision 86165) |
+++ Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (working copy) |
@@ -27,7 +27,6 @@ |
#include "CSSPropertyNames.h" |
#include "Document.h" |
#include "RenderStyle.h" |
-#include "SVGPaint.h" |
namespace WebCore { |
@@ -60,14 +59,6 @@ |
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 @@ |
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 @@ |
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: |