Index: Source/core/svg/SVGMPathElement.cpp |
diff --git a/Source/core/svg/SVGMPathElement.cpp b/Source/core/svg/SVGMPathElement.cpp |
index 8fb5460edd357d6103e1b69d5d59a437d2fb826c..e8596c93e49db6ec531adcffce8dfe50dfd54755 100644 |
--- a/Source/core/svg/SVGMPathElement.cpp |
+++ b/Source/core/svg/SVGMPathElement.cpp |
@@ -30,16 +30,16 @@ |
namespace WebCore { |
// Animated property definitions |
-DEFINE_ANIMATED_STRING(SVGMPathElement, XLinkNames::hrefAttr, Href, href) |
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGMPathElement) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
END_REGISTER_ANIMATED_PROPERTIES |
inline SVGMPathElement::SVGMPathElement(Document& document) |
: SVGElement(SVGNames::mpathTag, document) |
+ , m_href(SVGAnimatedString::create(this, XLinkNames::hrefAttr, SVGString::create())) |
{ |
ScriptWrappable::init(this); |
+ addToPropertyMap(m_href); |
registerAnimatedPropertiesForSVGMPathElement(); |
} |
@@ -60,7 +60,7 @@ void SVGMPathElement::buildPendingResource() |
return; |
AtomicString id; |
- Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), document(), &id); |
+ Element* target = SVGURIReference::targetElementFromIRIString(m_href->currentValue()->value(), document(), &id); |
if (!target) { |
// Do not register as pending if we are already pending this resource. |
if (document().accessSVGExtensions()->isElementPendingResource(this, id)) |
@@ -116,10 +116,14 @@ void SVGMPathElement::parseAttribute(const QualifiedName& name, const AtomicStri |
return; |
} |
- if (SVGURIReference::parseAttribute(name, value)) |
- return; |
+ SVGParsingError parseError = NoError; |
- ASSERT_NOT_REACHED(); |
+ if (name.matches(XLinkNames::hrefAttr)) |
+ m_href->setBaseValueAsString(value, parseError); |
+ else |
+ ASSERT_NOT_REACHED(); |
+ |
+ reportAttributeParsingError(parseError, name, value); |
} |
void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName) |
@@ -141,7 +145,7 @@ void SVGMPathElement::svgAttributeChanged(const QualifiedName& attrName) |
SVGPathElement* SVGMPathElement::pathElement() |
{ |
- Element* target = targetElementFromIRIString(hrefCurrentValue(), document()); |
+ Element* target = targetElementFromIRIString(m_href->currentValue()->value(), document()); |
if (target && target->hasTagName(SVGNames::pathTag)) |
return toSVGPathElement(target); |
return 0; |