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

Unified Diff: Source/WebCore/rendering/style/SVGRenderStyleDefs.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/rendering/style/SVGRenderStyleDefs.cpp
===================================================================
--- Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp (revision 86165)
+++ Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp (working copy)
@@ -37,27 +37,35 @@
StyleFillData::StyleFillData()
: opacity(SVGRenderStyle::initialFillOpacity())
- , paintType(SVGRenderStyle::initialFillPaintType())
- , paintColor(SVGRenderStyle::initialFillPaintColor())
- , paintUri(SVGRenderStyle::initialFillPaintUri())
+ , paint(SVGRenderStyle::initialFillPaint())
{
}
StyleFillData::StyleFillData(const StyleFillData& other)
: RefCounted<StyleFillData>()
, opacity(other.opacity)
- , paintType(other.paintType)
- , paintColor(other.paintColor)
- , paintUri(other.paintUri)
+ , paint(other.paint)
{
}
bool StyleFillData::operator==(const StyleFillData& other) const
{
- return opacity == other.opacity
- && paintType == other.paintType
- && paintColor == other.paintColor
- && paintUri == other.paintUri;
+ if (opacity != other.opacity)
+ return false;
+
+ if (!paint || !other.paint)
+ return paint == other.paint;
+
+ if (paint->paintType() != other.paint->paintType())
+ return false;
+
+ if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_URI)
+ return paint->uri() == other.paint->uri();
+
+ if (paint->paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR)
+ return paint->color() == other.paint->color();
+
+ return paint == other.paint;
}
StyleStrokeData::StyleStrokeData()
@@ -66,9 +74,7 @@
, width(SVGRenderStyle::initialStrokeWidth())
, dashOffset(SVGRenderStyle::initialStrokeDashOffset())
, dashArray(SVGRenderStyle::initialStrokeDashArray())
- , paintType(SVGRenderStyle::initialStrokePaintType())
- , paintColor(SVGRenderStyle::initialStrokePaintColor())
- , paintUri(SVGRenderStyle::initialStrokePaintUri())
+ , paint(SVGRenderStyle::initialStrokePaint())
{
}
@@ -79,22 +85,18 @@
, width(other.width)
, dashOffset(other.dashOffset)
, dashArray(other.dashArray)
- , paintType(other.paintType)
- , paintColor(other.paintColor)
- , paintUri(other.paintUri)
+ , paint(other.paint)
{
}
bool StyleStrokeData::operator==(const StyleStrokeData& other) const
{
- return width == other.width
+ return paint == other.paint
+ && width == other.width
&& opacity == other.opacity
&& miterLimit == other.miterLimit
&& dashOffset == other.dashOffset
- && dashArray == other.dashArray
- && paintType == other.paintType
- && paintColor == other.paintColor
- && paintUri == other.paintUri;
+ && dashArray == other.dashArray;
}
StyleStopData::StyleStopData()
« no previous file with comments | « Source/WebCore/rendering/style/SVGRenderStyleDefs.h ('k') | Source/WebCore/rendering/svg/RenderSVGResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698