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

Unified Diff: Source/core/svg/SVGScriptElement.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/SVGScriptElement.cpp
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
index e08b4a00a9d84328e52811f0ccf1ee2b4126ca14..5d121fa6d2b34c82a2c8071ebe36d70d36c75fcc 100644
--- a/Source/core/svg/SVGScriptElement.cpp
+++ b/Source/core/svg/SVGScriptElement.cpp
@@ -41,12 +41,11 @@ END_REGISTER_ANIMATED_PROPERTIES
inline SVGScriptElement::SVGScriptElement(Document& document, bool wasInsertedByParser, bool alreadyStarted)
: SVGElement(SVGNames::scriptTag, document)
- , m_href(SVGAnimatedString::create(this, XLinkNames::hrefAttr, SVGString::create()))
+ , SVGURIReference(this)
, m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired)
, m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted))
{
ScriptWrappable::init(this);
- addToPropertyMap(m_href);
registerAnimatedPropertiesForSVGScriptElement();
}
@@ -77,12 +76,12 @@ void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicStr
if (name == SVGNames::typeAttr)
return;
- if (name == HTMLNames::onerrorAttr)
+ if (name == HTMLNames::onerrorAttr) {
setAttributeEventListener(EventTypeNames::error, createAttributeEventListener(this, name, value));
- else if (name.matches(XLinkNames::hrefAttr))
- m_href->setBaseValueAsString(value, parseError);
- else
+ } else if (SVGURIReference::parseAttribute(name, value, parseError)) {
+ } else {
ASSERT_NOT_REACHED();
+ }
reportAttributeParsingError(parseError, name, value);
}
@@ -100,7 +99,7 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
return;
if (SVGURIReference::isKnownAttribute(attrName)) {
- m_loader->handleSourceAttribute(m_href->currentValue()->value());
+ m_loader->handleSourceAttribute(hrefString());
return;
}
@@ -147,7 +146,7 @@ bool SVGScriptElement::haveLoadedRequiredResources()
String SVGScriptElement::sourceAttributeValue() const
{
- return m_href->currentValue()->value();
+ return hrefString();
}
String SVGScriptElement::charsetAttributeValue() const
@@ -187,7 +186,7 @@ bool SVGScriptElement::deferAttributeValue() const
bool SVGScriptElement::hasSourceAttribute() const
{
- return m_href->isSpecified();
+ return href()->isSpecified();
}
PassRefPtr<Element> SVGScriptElement::cloneElementWithoutAttributesAndChildren()

Powered by Google App Engine
This is Rietveld 408576698