Index: Source/core/svg/SVGCircleElement.cpp |
diff --git a/Source/core/svg/SVGCircleElement.cpp b/Source/core/svg/SVGCircleElement.cpp |
index e1d6ba3bb6d1a1ac0571f2865341c9d0ee569e2a..51431c59dd409375d54948e7fa87bed54dfef7fc 100644 |
--- a/Source/core/svg/SVGCircleElement.cpp |
+++ b/Source/core/svg/SVGCircleElement.cpp |
@@ -30,26 +30,24 @@ |
namespace WebCore { |
// Animated property definitions |
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cxAttr, Cx, cx) |
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cyAttr, Cy, cy) |
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::rAttr, R, r) |
DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired) |
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(cx) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(cy) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(r) |
REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement) |
END_REGISTER_ANIMATED_PROPERTIES |
inline SVGCircleElement::SVGCircleElement(Document& document) |
: SVGGeometryElement(SVGNames::circleTag, document) |
- , m_cx(LengthModeWidth) |
- , m_cy(LengthModeHeight) |
- , m_r(LengthModeOther) |
+ , m_cx(SVGAnimatedLength::create(this, SVGNames::cxAttr, SVGLength::create(LengthModeWidth))) |
+ , m_cy(SVGAnimatedLength::create(this, SVGNames::cyAttr, SVGLength::create(LengthModeHeight))) |
+ , m_r(SVGAnimatedLength::create(this, SVGNames::rAttr, SVGLength::create(LengthModeOther))) |
{ |
ScriptWrappable::init(this); |
+ |
+ addToPropertyMap(m_cx); |
+ addToPropertyMap(m_cy); |
+ addToPropertyMap(m_r); |
registerAnimatedPropertiesForSVGCircleElement(); |
} |
@@ -77,11 +75,11 @@ void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicStr |
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::rAttr) |
- setRBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths)); |
+ m_r->setBaseValueAsString(value, ForbidNegativeLengths, parseError); |
else if (SVGExternalResourcesRequired::parseAttribute(name, value)) { |
} else |
ASSERT_NOT_REACHED(); |
@@ -125,9 +123,9 @@ void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName) |
bool SVGCircleElement::selfHasRelativeLengths() const |
{ |
- return cxCurrentValue().isRelative() |
- || cyCurrentValue().isRelative() |
- || rCurrentValue().isRelative(); |
+ return m_cx->currentValue()->isRelative() |
+ || m_cy->currentValue()->isRelative() |
+ || m_r->currentValue()->isRelative(); |
} |
RenderObject* SVGCircleElement::createRenderer(RenderStyle*) |