Index: Source/core/svg/SVGEllipseElement.cpp |
diff --git a/Source/core/svg/SVGEllipseElement.cpp b/Source/core/svg/SVGEllipseElement.cpp |
index 83fa9e7470fd4b82f8ed520f45bbbcc4746d46a3..5da47741f49c4ca4a4e794b5c640e2d15fc6924b 100644 |
--- a/Source/core/svg/SVGEllipseElement.cpp |
+++ b/Source/core/svg/SVGEllipseElement.cpp |
@@ -30,27 +30,23 @@ |
namespace WebCore { |
// Animated property definitions |
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cxAttr, Cx, cx) |
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cyAttr, Cy, cy) |
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::rxAttr, Rx, rx) |
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::ryAttr, Ry, ry) |
- |
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGEllipseElement) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(cx) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(cy) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(rx) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(ry) |
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
END_REGISTER_ANIMATED_PROPERTIES |
inline SVGEllipseElement::SVGEllipseElement(Document& document) |
: SVGGeometryElement(SVGNames::ellipseTag, document) |
- , m_cx(LengthModeWidth) |
- , m_cy(LengthModeHeight) |
- , m_rx(LengthModeWidth) |
- , m_ry(LengthModeHeight) |
+ , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(LengthModeWidth))) |
+ , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(LengthModeHeight))) |
+ , m_rx(SVGAnimatedLength::create(this, SVGNames::rxAttr, SVGLength::create(LengthModeWidth))) |
+ , m_ry(SVGAnimatedLength::create(this, SVGNames::ryAttr, SVGLength::create(LengthModeHeight))) |
{ |
ScriptWrappable::init(this); |
+ |
+ addToPropertyMap(m_cx); |
+ addToPropertyMap(m_cy); |
+ addToPropertyMap(m_rx); |
+ addToPropertyMap(m_ry); |
registerAnimatedPropertiesForSVGEllipseElement(); |
} |
@@ -78,13 +74,13 @@ void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicSt |
if (!isSupportedAttribute(name)) |
SVGGeometryElement::parseAttribute(name, value); |
else if (name == SVGNames::cxAttr) |
- setCxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); |
+ m_cx->setBaseValueAsString(value, AllowNegativeLengths, parseError); |
else if (name == SVGNames::cyAttr) |
- setCyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); |
+ m_cy->setBaseValueAsString(value, AllowNegativeLengths, parseError); |
else if (name == SVGNames::rxAttr) |
- setRxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); |
+ m_rx->setBaseValueAsString(value, ForbidNegativeLengths, parseError); |
else if (name == SVGNames::ryAttr) |
- setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); |
+ m_ry->setBaseValueAsString(value, ForbidNegativeLengths, parseError); |
else |
ASSERT_NOT_REACHED(); |
@@ -123,10 +119,10 @@ void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName) |
bool SVGEllipseElement::selfHasRelativeLengths() const |
{ |
- return cxCurrentValue().isRelative() |
- || cyCurrentValue().isRelative() |
- || rxCurrentValue().isRelative() |
- || ryCurrentValue().isRelative(); |
+ return m_cx->currentValue()->isRelative() |
+ || m_cy->currentValue()->isRelative() |
+ || m_rx->currentValue()->isRelative() |
+ || m_ry->currentValue()->isRelative(); |
} |
RenderObject* SVGEllipseElement::createRenderer(RenderStyle*) |