summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering/style/SVGRenderStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/style/SVGRenderStyle.h')
-rw-r--r--Source/WebCore/rendering/style/SVGRenderStyle.h50
1 files changed, 33 insertions, 17 deletions
diff --git a/Source/WebCore/rendering/style/SVGRenderStyle.h b/Source/WebCore/rendering/style/SVGRenderStyle.h
index 7f032e7..88a48df 100644
--- a/Source/WebCore/rendering/style/SVGRenderStyle.h
+++ b/Source/WebCore/rendering/style/SVGRenderStyle.h
@@ -70,15 +70,19 @@ public:
static SVGWritingMode initialWritingMode() { return WM_LRTB; }
static EGlyphOrientation initialGlyphOrientationHorizontal() { return GO_0DEG; }
static EGlyphOrientation initialGlyphOrientationVertical() { return GO_AUTO; }
- static float initialFillOpacity() { return 1.0f; }
- static SVGPaint* initialFillPaint() { return SVGPaint::defaultFill(); }
- static float initialStrokeOpacity() { return 1.0f; }
- static SVGPaint* initialStrokePaint() { return SVGPaint::defaultStroke(); }
+ static float initialFillOpacity() { return 1; }
+ static SVGPaint::SVGPaintType initialFillPaintType() { return SVGPaint::SVG_PAINTTYPE_RGBCOLOR; }
+ static Color initialFillPaintColor() { return Color::black; }
+ static String initialFillPaintUri() { return String(); }
+ static float initialStrokeOpacity() { return 1; }
+ static SVGPaint::SVGPaintType initialStrokePaintType() { return SVGPaint::SVG_PAINTTYPE_NONE; }
+ static Color initialStrokePaintColor() { return Color(); }
+ static String initialStrokePaintUri() { return String(); }
static Vector<SVGLength> initialStrokeDashArray() { return Vector<SVGLength>(); }
- static float initialStrokeMiterLimit() { return 4.0f; }
- static float initialStopOpacity() { return 1.0f; }
+ static float initialStrokeMiterLimit() { return 4; }
+ static float initialStopOpacity() { return 1; }
static Color initialStopColor() { return Color(0, 0, 0); }
- static float initialFloodOpacity() { return 1.0f; }
+ static float initialFloodOpacity() { return 1; }
static Color initialFloodColor() { return Color(0, 0, 0); }
static Color initialLightingColor() { return Color(255, 255, 255); }
static ShadowData* initialShadow() { return 0; }
@@ -150,10 +154,14 @@ public:
fill.access()->opacity = obj;
}
- void setFillPaint(PassRefPtr<SVGPaint> obj)
+ void setFillPaint(SVGPaint::SVGPaintType type, const Color& color, const String& uri)
{
- if (!(fill->paint == obj))
- fill.access()->paint = obj;
+ if (!(fill->paintType == type))
+ fill.access()->paintType = type;
+ if (!(fill->paintColor == color))
+ fill.access()->paintColor = color;
+ if (!(fill->paintUri == uri))
+ fill.access()->paintUri = uri;
}
void setStrokeOpacity(float obj)
@@ -162,10 +170,14 @@ public:
stroke.access()->opacity = obj;
}
- void setStrokePaint(PassRefPtr<SVGPaint> obj)
+ void setStrokePaint(SVGPaint::SVGPaintType type, const Color& color, const String& uri)
{
- if (!(stroke->paint == obj))
- stroke.access()->paint = obj;
+ if (!(stroke->paintType == type))
+ stroke.access()->paintType = type;
+ if (!(stroke->paintColor == color))
+ stroke.access()->paintColor = color;
+ if (!(stroke->paintUri == uri))
+ stroke.access()->paintUri = uri;
}
void setStrokeDashArray(const Vector<SVGLength>& obj)
@@ -293,9 +305,13 @@ public:
EGlyphOrientation glyphOrientationHorizontal() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationHorizontal; }
EGlyphOrientation glyphOrientationVertical() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationVertical; }
float fillOpacity() const { return fill->opacity; }
- SVGPaint* fillPaint() const { return fill->paint.get(); }
+ const SVGPaint::SVGPaintType& fillPaintType() const { return fill->paintType; }
+ const Color& fillPaintColor() const { return fill->paintColor; }
+ const String& fillPaintUri() const { return fill->paintUri; }
float strokeOpacity() const { return stroke->opacity; }
- SVGPaint* strokePaint() const { return stroke->paint.get(); }
+ const SVGPaint::SVGPaintType& strokePaintType() const { return stroke->paintType; }
+ const Color& strokePaintColor() const { return stroke->paintColor; }
+ const String& strokePaintUri() const { return stroke->paintUri; }
Vector<SVGLength> strokeDashArray() const { return stroke->dashArray; }
float strokeMiterLimit() const { return stroke->miterLimit; }
SVGLength strokeWidth() const { return stroke->width; }
@@ -320,8 +336,8 @@ public:
bool hasMasker() const { return !maskerResource().isEmpty(); }
bool hasFilter() const { return !filterResource().isEmpty(); }
bool hasMarkers() const { return !markerStartResource().isEmpty() || !markerMidResource().isEmpty() || !markerEndResource().isEmpty(); }
- bool hasStroke() const { return strokePaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
- bool hasFill() const { return fillPaint()->paintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
+ bool hasStroke() const { return strokePaintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
+ bool hasFill() const { return fillPaintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
bool isVerticalWritingMode() const { return writingMode() == WM_TBRL || writingMode() == WM_TB; }
protected: