Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1429)

Unified Diff: Source/core/rendering/svg/RenderSVGShape.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/svg/RenderSVGShape.cpp
diff --git a/Source/core/rendering/svg/RenderSVGShape.cpp b/Source/core/rendering/svg/RenderSVGShape.cpp
index f84b85e58938be0aec0c182dcf274a7cdd35cd5c..5272fdf56c5172a25a743002e39cb2b539db06ff 100644
--- a/Source/core/rendering/svg/RenderSVGShape.cpp
+++ b/Source/core/rendering/svg/RenderSVGShape.cpp
@@ -118,7 +118,7 @@ bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co
if (!m_fillBoundingBox.contains(point))
return false;
- Color fallbackColor;
+ StyleColor fallbackColor;
if (requiresFill && !RenderSVGResource::fillPaintingResource(this, style(), fallbackColor))
return false;
@@ -130,7 +130,7 @@ bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke
if (!strokeBoundingBox().contains(point))
return false;
- Color fallbackColor;
+ StyleColor fallbackColor;
if (requiresStroke && !RenderSVGResource::strokePaintingResource(this, style(), fallbackColor))
return false;
@@ -215,13 +215,13 @@ bool RenderSVGShape::shouldGenerateMarkerPositions() const
void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context)
{
- Color fallbackColor;
+ StyleColor fallbackColor;
if (RenderSVGResource* fillPaintingResource = RenderSVGResource::fillPaintingResource(this, style, fallbackColor)) {
if (fillPaintingResource->applyResource(this, style, context, ApplyToFillMode))
fillPaintingResource->postApplyResource(this, context, ApplyToFillMode, 0, this);
else if (fallbackColor.isValid()) {
RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
- fallbackResource->setColor(fallbackColor);
+ fallbackResource->setColor(fallbackColor.color());
if (fallbackResource->applyResource(this, style, context, ApplyToFillMode))
fallbackResource->postApplyResource(this, context, ApplyToFillMode, 0, this);
}
@@ -230,13 +230,13 @@ void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context)
void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context)
{
- Color fallbackColor;
+ StyleColor fallbackColor;
if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource(this, style, fallbackColor)) {
if (strokePaintingResource->applyResource(this, style, context, ApplyToStrokeMode))
strokePaintingResource->postApplyResource(this, context, ApplyToStrokeMode, 0, this);
else if (fallbackColor.isValid()) {
RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
- fallbackResource->setColor(fallbackColor);
+ fallbackResource->setColor(fallbackColor.color());
if (fallbackResource->applyResource(this, style, context, ApplyToStrokeMode))
fallbackResource->postApplyResource(this, context, ApplyToStrokeMode, 0, this);
}

Powered by Google App Engine
This is Rietveld 408576698