Index: Source/core/rendering/style/SVGRenderStyle.h |
diff --git a/Source/core/rendering/style/SVGRenderStyle.h b/Source/core/rendering/style/SVGRenderStyle.h |
index ca6a8b8d0cba82d9b4f6ad4883ca4e1cf228652f..2f94d945f45457953f005ca05bb52f44fa8a1b94 100644 |
--- a/Source/core/rendering/style/SVGRenderStyle.h |
+++ b/Source/core/rendering/style/SVGRenderStyle.h |
@@ -79,7 +79,7 @@ public: |
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 PassRefPtr<SVGLengthList> initialStrokeDashArray() { return SVGLengthList::create(); } |
static float initialStrokeMiterLimit() { return 4; } |
static float initialStopOpacity() { return 1; } |
static Color initialStopColor() { return Color(0, 0, 0); } |
@@ -95,32 +95,32 @@ public: |
static EMaskType initialMaskType() { return MT_LUMINANCE; } |
static EPaintOrder initialPaintOrder() { return PO_NORMAL; } |
- static SVGLength initialBaselineShiftValue() |
+ static PassRefPtr<SVGLength> initialBaselineShiftValue() |
{ |
- SVGLength length; |
- length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION); |
- return length; |
+ RefPtr<SVGLength> length = SVGLength::create(); |
+ length->newValueSpecifiedUnits(LengthTypeNumber, 0); |
+ return length.release(); |
} |
- static SVGLength initialKerning() |
+ static PassRefPtr<SVGLength> initialKerning() |
{ |
- SVGLength length; |
- length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION); |
- return length; |
+ RefPtr<SVGLength> length = SVGLength::create(); |
+ length->newValueSpecifiedUnits(LengthTypeNumber, 0); |
+ return length.release(); |
} |
- static SVGLength initialStrokeDashOffset() |
+ static PassRefPtr<SVGLength> initialStrokeDashOffset() |
{ |
- SVGLength length; |
- length.newValueSpecifiedUnits(LengthTypeNumber, 0, ASSERT_NO_EXCEPTION); |
- return length; |
+ RefPtr<SVGLength> length = SVGLength::create(); |
+ length->newValueSpecifiedUnits(LengthTypeNumber, 0); |
+ return length.release(); |
} |
- static SVGLength initialStrokeWidth() |
+ static PassRefPtr<SVGLength> initialStrokeWidth() |
{ |
- SVGLength length; |
- length.newValueSpecifiedUnits(LengthTypeNumber, 1, ASSERT_NO_EXCEPTION); |
- return length; |
+ RefPtr<SVGLength> length = SVGLength::create(); |
+ length->newValueSpecifiedUnits(LengthTypeNumber, 1); |
+ return length.release(); |
} |
// SVG CSS Property setters |
@@ -196,7 +196,7 @@ public: |
} |
} |
- void setStrokeDashArray(const Vector<SVGLength>& obj) |
+ void setStrokeDashArray(PassRefPtr<SVGLengthList> obj) |
{ |
if (!(stroke->dashArray == obj)) |
stroke.access()->dashArray = obj; |
@@ -208,19 +208,19 @@ public: |
stroke.access()->miterLimit = obj; |
} |
- void setStrokeWidth(const SVGLength& obj) |
+ void setStrokeWidth(PassRefPtr<SVGLength> obj) |
{ |
if (!(stroke->width == obj)) |
stroke.access()->width = obj; |
} |
- void setStrokeDashOffset(const SVGLength& obj) |
+ void setStrokeDashOffset(PassRefPtr<SVGLength> obj) |
{ |
if (!(stroke->dashOffset == obj)) |
stroke.access()->dashOffset = obj; |
} |
- void setKerning(const SVGLength& obj) |
+ void setKerning(PassRefPtr<SVGLength> obj) |
{ |
if (!(text->kerning == obj)) |
text.access()->kerning = obj; |
@@ -256,7 +256,7 @@ public: |
misc.access()->lightingColor = obj; |
} |
- void setBaselineShiftValue(const SVGLength& obj) |
+ void setBaselineShiftValue(PassRefPtr<SVGLength> obj) |
{ |
if (!(misc->baselineShiftValue == obj)) |
misc.access()->baselineShiftValue = obj; |
@@ -326,17 +326,17 @@ public: |
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; } |
+ PassRefPtr<SVGLengthList> strokeDashArray() const { return stroke->dashArray; } |
float strokeMiterLimit() const { return stroke->miterLimit; } |
- SVGLength strokeWidth() const { return stroke->width; } |
- SVGLength strokeDashOffset() const { return stroke->dashOffset; } |
- SVGLength kerning() const { return text->kerning; } |
+ PassRefPtr<SVGLength> strokeWidth() const { return stroke->width; } |
+ PassRefPtr<SVGLength> strokeDashOffset() const { return stroke->dashOffset; } |
+ PassRefPtr<SVGLength> kerning() const { return text->kerning; } |
float stopOpacity() const { return stops->opacity; } |
const Color& stopColor() const { return stops->color; } |
float floodOpacity() const { return misc->floodOpacity; } |
const Color& floodColor() const { return misc->floodColor; } |
const Color& lightingColor() const { return misc->lightingColor; } |
- SVGLength baselineShiftValue() const { return misc->baselineShiftValue; } |
+ PassRefPtr<SVGLength> baselineShiftValue() const { return misc->baselineShiftValue; } |
const AtomicString& clipperResource() const { return resources->clipper; } |
const AtomicString& filterResource() const { return resources->filter; } |
const AtomicString& maskerResource() const { return resources->masker; } |
@@ -360,7 +360,7 @@ public: |
bool hasFilter() const { return !filterResource().isEmpty(); } |
bool hasMarkers() const { return !markerStartResource().isEmpty() || !markerMidResource().isEmpty() || !markerEndResource().isEmpty(); } |
bool hasStroke() const { return strokePaintType() != SVGPaint::SVG_PAINTTYPE_NONE; } |
- bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero(); } |
+ bool hasVisibleStroke() const { return hasStroke() && !strokeWidth()->isZero(); } |
bool hasFill() const { return fillPaintType() != SVGPaint::SVG_PAINTTYPE_NONE; } |
bool isVerticalWritingMode() const { return writingMode() == WM_TBRL || writingMode() == WM_TB; } |