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

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

Issue 113133002: Rewrite to not store type in m_type and also remove type getter/setter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/svg/SVGScriptElement.h ('k') | Source/core/svg/SVGScriptElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGScriptElement.cpp
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
index 36891e3161d564f253f31c060f0a085005dbd8b1..e08b4a00a9d84328e52811f0ccf1ee2b4126ca14 100644
--- a/Source/core/svg/SVGScriptElement.cpp
+++ b/Source/core/svg/SVGScriptElement.cpp
@@ -74,10 +74,10 @@ void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicStr
}
SVGParsingError parseError = NoError;
-
if (name == SVGNames::typeAttr)
- setType(value);
- else if (name == HTMLNames::onerrorAttr)
+ return;
+
+ if (name == HTMLNames::onerrorAttr)
setAttributeEventListener(EventTypeNames::error, createAttributeEventListener(this, name, value));
else if (name.matches(XLinkNames::hrefAttr))
m_href->setBaseValueAsString(value, parseError);
@@ -140,16 +140,6 @@ void SVGScriptElement::finishParsingChildren()
m_loader->setHaveFiredLoadEvent(true);
}
-String SVGScriptElement::type() const
-{
- return m_type;
-}
-
-void SVGScriptElement::setType(const String& type)
-{
- m_type = type;
-}
-
bool SVGScriptElement::haveLoadedRequiredResources()
{
return m_loader->haveFiredLoadEvent();
@@ -167,7 +157,7 @@ String SVGScriptElement::charsetAttributeValue() const
String SVGScriptElement::typeAttributeValue() const
{
- return type();
+ return getAttribute(SVGNames::typeAttr).string();
}
String SVGScriptElement::languageAttributeValue() const
@@ -210,4 +200,14 @@ void SVGScriptElement::dispatchLoadEvent()
dispatchEvent(Event::create(EventTypeNames::load));
}
+#ifndef NDEBUG
+bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& name) const
+{
+ if (name == SVGNames::typeAttr)
+ return false;
+
+ return SVGElement::isAnimatableAttribute(name);
+}
+#endif
+
}
« no previous file with comments | « Source/core/svg/SVGScriptElement.h ('k') | Source/core/svg/SVGScriptElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698