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

Unified Diff: Source/core/css/SVGCSSComputedStyleDeclaration.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/css/SVGCSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
index fd03b7c4e35fdf7821bfe42f56b4b5ce757a98dc..1dabadfe1174c56284afb83df157cbab25130e47 100644
--- a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp
@@ -62,8 +62,11 @@ static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength
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());
+ if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR || paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI_CURRENTCOLOR) {
+ // SVG handles currentColor itself, style->color() is guaranteed not to be currentColor.
+ ASSERT(!style->color().isCurrentColor());
+ paint->setColor(style->color().color());
+ }
return paint.release();
}
@@ -190,7 +193,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp
return 0;
}
case CSSPropertyWebkitSvgShadow:
- return valueForShadow(svgStyle->shadow(), propertyID, style);
+ return valueForShadow(node->renderer(), svgStyle->shadow(), propertyID, style);
case CSSPropertyVectorEffect:
return CSSPrimitiveValue::create(svgStyle->vectorEffect());
case CSSPropertyMaskType:

Powered by Google App Engine
This is Rietveld 408576698