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

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

Issue 169103002: Drop [LegacyImplementedInBaseClass] from SVGURIReference IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
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)

Powered by Google App Engine
This is Rietveld 408576698