Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1614)

Unified Diff: Source/core/svg/SVGCursorElement.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGCursorElement.h ('k') | Source/core/svg/SVGEllipseElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGCursorElement.cpp
diff --git a/Source/core/svg/SVGCursorElement.cpp b/Source/core/svg/SVGCursorElement.cpp
index 2d2f31c1813cb9711b458fe9ba9ddbbcfb3a3fdc..08724d281cda8463d90fffdc2a41b9309353b35b 100644
--- a/Source/core/svg/SVGCursorElement.cpp
+++ b/Source/core/svg/SVGCursorElement.cpp
@@ -30,23 +30,22 @@
namespace WebCore {
// Animated property definitions
-DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::xAttr, X, x)
-DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::yAttr, Y, y)
DEFINE_ANIMATED_STRING(SVGCursorElement, XLinkNames::hrefAttr, Href, href)
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCursorElement)
- REGISTER_LOCAL_ANIMATED_PROPERTY(x)
- REGISTER_LOCAL_ANIMATED_PROPERTY(y)
REGISTER_LOCAL_ANIMATED_PROPERTY(href)
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
END_REGISTER_ANIMATED_PROPERTIES
inline SVGCursorElement::SVGCursorElement(Document& document)
: SVGElement(SVGNames::cursorTag, document)
- , m_x(LengthModeWidth)
- , m_y(LengthModeHeight)
+ , m_x(SVGAnimatedLength::create(this, SVGNames::xAttr, SVGLength::create(LengthModeWidth)))
+ , m_y(SVGAnimatedLength::create(this, SVGNames::yAttr, SVGLength::create(LengthModeHeight)))
{
ScriptWrappable::init(this);
+
+ addToPropertyMap(m_x);
+ addToPropertyMap(m_y);
registerAnimatedPropertiesForSVGCursorElement();
}
@@ -81,9 +80,9 @@ void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicStr
if (!isSupportedAttribute(name))
SVGElement::parseAttribute(name, value);
else if (name == SVGNames::xAttr)
- setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
+ m_x->setBaseValueAsString(value, AllowNegativeLengths, parseError);
else if (name == SVGNames::yAttr)
- setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
+ m_y->setBaseValueAsString(value, AllowNegativeLengths, parseError);
else if (SVGTests::parseAttribute(name, value)
|| SVGURIReference::parseAttribute(name, value)) {
} else
« no previous file with comments | « Source/core/svg/SVGCursorElement.h ('k') | Source/core/svg/SVGEllipseElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698