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

Unified Diff: Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp

Issue 7002001: Revert 79985 - 2011-03-01 Nikolas Zimmermann <nzimmermann@rim.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « Source/WebCore/css/CSSValue.h ('k') | Source/WebCore/css/SVGCSSStyleSelector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
===================================================================
--- Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (revision 86165)
+++ Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (working copy)
@@ -27,7 +27,6 @@
#include "CSSPropertyNames.h"
#include "Document.h"
#include "RenderStyle.h"
-#include "SVGPaint.h"
namespace WebCore {
@@ -60,14 +59,6 @@
return list.release();
}
-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());
- return paint.release();
-}
-
PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const
{
Node* node = m_node.get();
@@ -136,13 +127,13 @@
return CSSPrimitiveValue::create(svgStyle->filterResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyFloodColor:
- return currentColorOrValidColor(style, svgStyle->floodColor());
+ return CSSPrimitiveValue::createColor(svgStyle->floodColor().rgb());
case CSSPropertyLightingColor:
- return currentColorOrValidColor(style, svgStyle->lightingColor());
+ return CSSPrimitiveValue::createColor(svgStyle->lightingColor().rgb());
case CSSPropertyStopColor:
- return currentColorOrValidColor(style, svgStyle->stopColor());
+ return CSSPrimitiveValue::createColor(svgStyle->stopColor().rgb());
case CSSPropertyFill:
- return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->fillPaintType(), svgStyle->fillPaintUri(), svgStyle->fillPaintColor()), style);
+ return svgStyle->fillPaint();
case CSSPropertyKerning:
return SVGLength::toCSSPrimitiveValue(svgStyle->kerning());
case CSSPropertyMarkerEnd:
@@ -158,7 +149,7 @@
return CSSPrimitiveValue::create(svgStyle->markerStartResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyStroke:
- return adjustSVGPaintForCurrentColor(SVGPaint::create(svgStyle->strokePaintType(), svgStyle->strokePaintUri(), svgStyle->strokePaintColor()), style);
+ return svgStyle->strokePaint();
case CSSPropertyStrokeDasharray:
return strokeDashArrayToCSSValueList(svgStyle->strokeDashArray());
case CSSPropertyStrokeDashoffset:
« no previous file with comments | « Source/WebCore/css/CSSValue.h ('k') | Source/WebCore/css/SVGCSSStyleSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698