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

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

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 6ef2308bb043bd485a471f4fd3a255c8317c42d8..091ef2f639f8b5f58ccc7242f0b708f8b025be2d 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;
- StyleColor fallbackColor;
+ Color 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;
- StyleColor fallbackColor;
+ Color fallbackColor;
if (requiresStroke && !RenderSVGResource::strokePaintingResource(this, style(), fallbackColor))
return false;
@@ -214,13 +214,13 @@ bool RenderSVGShape::shouldGenerateMarkerPositions() const
void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context)
{
- StyleColor fallbackColor;
+ Color 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.color());
+ fallbackResource->setColor(fallbackColor);
if (fallbackResource->applyResource(this, style, context, ApplyToFillMode))
fallbackResource->postApplyResource(this, context, ApplyToFillMode, 0, this);
}
@@ -229,13 +229,13 @@ void RenderSVGShape::fillShape(RenderStyle* style, GraphicsContext* context)
void RenderSVGShape::strokeShape(RenderStyle* style, GraphicsContext* context)
{
- StyleColor fallbackColor;
+ Color 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.color());
+ fallbackResource->setColor(fallbackColor);
if (fallbackResource->applyResource(this, style, context, ApplyToStrokeMode))
fallbackResource->postApplyResource(this, context, ApplyToStrokeMode, 0, this);
}

Powered by Google App Engine
This is Rietveld 408576698