| 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()
|
|
|