| Index: Source/core/rendering/svg/RenderSVGResource.cpp
|
| diff --git a/Source/core/rendering/svg/RenderSVGResource.cpp b/Source/core/rendering/svg/RenderSVGResource.cpp
|
| index 1b1bbe9e17fa6c37257c8cda7467ae10618cf348..3646cc1a480d2a917e6f1bbac871b814b3eafe81 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, StyleColor& color)
|
| +static inline bool inheritColorFromParentStyleIfNeeded(RenderObject* object, bool applyToFill, Color& 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, StyleColor& fallbackColor)
|
| +static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode mode, RenderObject* object, const RenderStyle* style, Color& fallbackColor)
|
| {
|
| ASSERT(object);
|
| ASSERT(style);
|
| @@ -80,7 +80,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m
|
| if (paintType == SVGPaint::SVG_PAINTTYPE_NONE)
|
| return 0;
|
|
|
| - StyleColor color;
|
| + Color color;
|
| switch (paintType) {
|
| case SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR:
|
| case SVGPaint::SVG_PAINTTYPE_RGBCOLOR:
|
| @@ -100,7 +100,8 @@ 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();
|
| - color = Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), color.alpha());
|
| + if (visitedColor.isValid())
|
| + color = Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), color.alpha());
|
| }
|
| }
|
|
|
| @@ -110,7 +111,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m
|
| if (!inheritColorFromParentStyleIfNeeded(object, applyToFill, color))
|
| return 0;
|
|
|
| - colorResource->setColor(color.color());
|
| + colorResource->setColor(color);
|
| return colorResource;
|
| }
|
|
|
| @@ -120,7 +121,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m
|
| if (paintType == SVGPaint::SVG_PAINTTYPE_URI_NONE || !inheritColorFromParentStyleIfNeeded(object, applyToFill, color))
|
| return 0;
|
|
|
| - colorResource->setColor(color.color());
|
| + colorResource->setColor(color);
|
| return colorResource;
|
| }
|
|
|
| @@ -130,7 +131,7 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m
|
| if (!inheritColorFromParentStyleIfNeeded(object, applyToFill, color))
|
| return 0;
|
|
|
| - colorResource->setColor(color.color());
|
| + colorResource->setColor(color);
|
| return colorResource;
|
| }
|
|
|
| @@ -140,12 +141,12 @@ static inline RenderSVGResource* requestPaintingResource(RenderSVGResourceMode m
|
| return uriResource;
|
| }
|
|
|
| -RenderSVGResource* RenderSVGResource::fillPaintingResource(RenderObject* object, const RenderStyle* style, StyleColor& fallbackColor)
|
| +RenderSVGResource* RenderSVGResource::fillPaintingResource(RenderObject* object, const RenderStyle* style, Color& fallbackColor)
|
| {
|
| return requestPaintingResource(ApplyToFillMode, object, style, fallbackColor);
|
| }
|
|
|
| -RenderSVGResource* RenderSVGResource::strokePaintingResource(RenderObject* object, const RenderStyle* style, StyleColor& fallbackColor)
|
| +RenderSVGResource* RenderSVGResource::strokePaintingResource(RenderObject* object, const RenderStyle* style, Color& fallbackColor)
|
| {
|
| return requestPaintingResource(ApplyToStrokeMode, object, style, fallbackColor);
|
| }
|
|
|