Index: Source/core/rendering/svg/RenderSVGResource.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResource.cpp b/Source/core/rendering/svg/RenderSVGResource.cpp |
index 6b13ce7bf58d3ec8ea5a2c504608654c1848a4e1..9ecdfdff143a0d2005eb34f45463062ae70b5b2b 100644 |
--- a/Source/core/rendering/svg/RenderSVGResource.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResource.cpp |
@@ -34,7 +34,7 @@ |
namespace WebCore { |
-static inline bool inheritColorFromParentStyleIfNeeded(RenderObject* object, bool applyToFill, Color& color) |
+static inline bool inheritColorFromParentStyleIfNeeded(RenderObject* object, bool applyToFill, StyleColor& color) |
{ |
if (color.isValid()) |
return true; |
@@ -45,7 +45,7 @@ static inline bool inheritColorFromParentStyleIfNeeded(RenderObject* object, boo |
return true; |
} |
-static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode mode, RenderObject* object, const RenderStyle* style, Color& fallbackColor) |
+static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode mode, RenderObject* object, const RenderStyle* style, StyleColor& fallbackColor) |
{ |
ASSERT(object); |
ASSERT(style); |
@@ -80,7 +80,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
if (paintType == SVGPaint::SVG_PAINTTYPE_NONE) |
return 0; |
- Color color; |
+ StyleColor color; |
switch (paintType) { |
case SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR: |
case SVGPaint::SVG_PAINTTYPE_RGBCOLOR: |
@@ -100,8 +100,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
// For SVG_PAINTTYPE_CURRENTCOLOR, 'color' already contains the 'visitedColor'. |
if (visitedPaintType < SVGPaint::SVG_PAINTTYPE_URI_NONE && visitedPaintType != SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR) { |
const Color& visitedColor = applyToFill ? svgStyle->visitedLinkFillPaintColor() : svgStyle->visitedLinkStrokePaintColor(); |
- if (visitedColor.isValid()) |
- color = Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), color.alpha()); |
+ color = Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), color.alpha()); |
} |
} |
@@ -111,7 +110,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
if (!inheritColorFromParentStyleIfNeeded(object, applyToFill, color)) |
return 0; |
- colorResource->setColor(color); |
+ colorResource->setColor(color.color()); |
return colorResource; |
} |
@@ -121,7 +120,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
if (paintType == SVGPaint::SVG_PAINTTYPE_URI_NONE || !inheritColorFromParentStyleIfNeeded(object, applyToFill, color)) |
return 0; |
- colorResource->setColor(color); |
+ colorResource->setColor(color.color()); |
return colorResource; |
} |
@@ -131,7 +130,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
if (!inheritColorFromParentStyleIfNeeded(object, applyToFill, color)) |
return 0; |
- colorResource->setColor(color); |
+ colorResource->setColor(color.color()); |
return colorResource; |
} |
@@ -141,12 +140,12 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m |
return uriResource; |
} |
-RenderSVGResource* RenderSVGResource::fillPaintingResource(RenderObject* object, const RenderStyle* style, Color& fallbackColor) |
+RenderSVGResource* RenderSVGResource::fillPaintingResource(RenderObject* object, const RenderStyle* style, StyleColor& fallbackColor) |
{ |
return requestPaintingResource(ApplyToFillMode, object, style, fallbackColor); |
} |
-RenderSVGResource* RenderSVGResource::strokePaintingResource(RenderObject* object, const RenderStyle* style, Color& fallbackColor) |
+RenderSVGResource* RenderSVGResource::strokePaintingResource(RenderObject* object, const RenderStyle* style, StyleColor& fallbackColor) |
{ |
return requestPaintingResource(ApplyToStrokeMode, object, style, fallbackColor); |
} |