Index: Source/core/svg/SVGGlyphRefElement.cpp |
diff --git a/Source/core/svg/SVGGlyphRefElement.cpp b/Source/core/svg/SVGGlyphRefElement.cpp |
index 6e81e57c9cdf74cd3df2495fa380e23ecac05457..2385cade132ab3e8469e3a07767a0a0257a3dd4a 100644 |
--- a/Source/core/svg/SVGGlyphRefElement.cpp |
+++ b/Source/core/svg/SVGGlyphRefElement.cpp |
@@ -36,14 +36,13 @@ END_REGISTER_ANIMATED_PROPERTIES |
inline SVGGlyphRefElement::SVGGlyphRefElement(Document& document) |
: SVGElement(SVGNames::glyphRefTag, document) |
- , m_href(SVGAnimatedString::create(this, XLinkNames::hrefAttr, SVGString::create())) |
+ , SVGURIReference(this) |
, m_x(0) |
, m_y(0) |
, m_dx(0) |
, m_dy(0) |
{ |
ScriptWrappable::init(this); |
- addToPropertyMap(m_href); |
registerAnimatedPropertiesForSVGGlyphRefElement(); |
} |
@@ -69,6 +68,7 @@ void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const |
const CharType* end = ptr + value.length(); |
// FIXME: We need some error handling here. |
+ SVGParsingError parseError = NoError; |
if (name == SVGNames::xAttr) { |
parseNumber(ptr, end, m_x); |
} else if (name == SVGNames::yAttr) { |
@@ -77,13 +77,11 @@ void SVGGlyphRefElement::parseAttributeInternal(const QualifiedName& name, const |
parseNumber(ptr, end, m_dx); |
} else if (name == SVGNames::dyAttr) { |
parseNumber(ptr, end, m_dy); |
- } else if (name.matches(XLinkNames::hrefAttr)) { |
- SVGParsingError parseError = NoError; |
- m_href->setBaseValueAsString(value, parseError); |
- reportAttributeParsingError(parseError, name, value); |
+ } else if (SVGURIReference::parseAttribute(name, value, parseError)) { |
} else { |
SVGElement::parseAttribute(name, value); |
} |
+ reportAttributeParsingError(parseError, name, value); |
} |
void SVGGlyphRefElement::parseAttribute(const QualifiedName& name, const AtomicString& value) |