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

Unified Diff: Source/WebCore/css/SVGCSSStyleSelector.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
Index: Source/WebCore/css/SVGCSSStyleSelector.cpp
===================================================================
--- Source/WebCore/css/SVGCSSStyleSelector.cpp (revision 86165)
+++ Source/WebCore/css/SVGCSSStyleSelector.cpp (working copy)
@@ -231,36 +231,17 @@
// end of ident only properties
case CSSPropertyFill:
{
- if (isInherit) {
- const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle();
- svgstyle->setFillPaint(svgParentStyle->fillPaintType(), svgParentStyle->fillPaintColor(), svgParentStyle->fillPaintUri());
- return;
- }
- if (isInitial) {
- svgstyle->setFillPaint(SVGRenderStyle::initialFillPaintType(), SVGRenderStyle::initialFillPaintColor(), SVGRenderStyle::initialFillPaintUri());
- return;
- }
- if (value->isSVGPaint()) {
- SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
- svgstyle->setFillPaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, m_style->color()), svgPaint->uri());
- }
+ HANDLE_INHERIT_AND_INITIAL(fillPaint, FillPaint)
+ if (value->isSVGPaint())
+ svgstyle->setFillPaint(static_cast<SVGPaint*>(value));
break;
}
case CSSPropertyStroke:
{
- if (isInherit) {
- const SVGRenderStyle* svgParentStyle = m_parentStyle->svgStyle();
- svgstyle->setStrokePaint(svgParentStyle->strokePaintType(), svgParentStyle->strokePaintColor(), svgParentStyle->strokePaintUri());
- return;
- }
- if (isInitial) {
- svgstyle->setStrokePaint(SVGRenderStyle::initialStrokePaintType(), SVGRenderStyle::initialStrokePaintColor(), SVGRenderStyle::initialStrokePaintUri());
- return;
- }
- if (value->isSVGPaint()) {
- SVGPaint* svgPaint = static_cast<SVGPaint*>(value);
- svgstyle->setStrokePaint(svgPaint->paintType(), colorFromSVGColorCSSValue(svgPaint, m_style->color()), svgPaint->uri());
- }
+ HANDLE_INHERIT_AND_INITIAL(strokePaint, StrokePaint)
+ if (value->isSVGPaint())
+ svgstyle->setStrokePaint(static_cast<SVGPaint*>(value));
+
break;
}
case CSSPropertyStrokeWidth:
« no previous file with comments | « Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp ('k') | Source/WebCore/rendering/style/SVGRenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698