Index: Source/core/svg/SVGScriptElement.cpp |
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp |
index 7099c20162db9cee840f2c67764eba2482361cfd..f27d91dcac1282a347be4e27589700148456a084 100644 |
--- a/Source/core/svg/SVGScriptElement.cpp |
+++ b/Source/core/svg/SVGScriptElement.cpp |
@@ -49,56 +49,22 @@ PassRefPtrWillBeRawPtr<SVGScriptElement> SVGScriptElement::create(Document& docu |
return adoptRefWillBeNoop(new SVGScriptElement(document, insertedByParser, false)); |
} |
-bool SVGScriptElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- SVGURIReference::addSupportedAttributes(supportedAttributes); |
- supportedAttributes.add(SVGNames::typeAttr); |
- supportedAttributes.add(HTMLNames::onerrorAttr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value) |
{ |
- if (!isSupportedAttribute(name)) { |
- SVGElement::parseAttribute(name, value); |
- return; |
- } |
- |
- SVGParsingError parseError = NoError; |
- if (name == SVGNames::typeAttr) |
- return; |
- |
- if (name == HTMLNames::onerrorAttr) { |
+ if (name == HTMLNames::onerrorAttr) |
setAttributeEventListener(EventTypeNames::error, createAttributeEventListener(this, name, value, eventParameterName())); |
- } else if (SVGURIReference::parseAttribute(name, value, parseError)) { |
- } else { |
- ASSERT_NOT_REACHED(); |
- } |
- |
- reportAttributeParsingError(parseError, name, value); |
+ else |
+ parseAttributeNew(name, value); |
} |
void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGElement::svgAttributeChanged(attrName); |
- return; |
- } |
- |
- SVGElement::InvalidationGuard invalidationGuard(this); |
- |
- if (attrName == SVGNames::typeAttr || attrName == HTMLNames::onerrorAttr) |
- return; |
- |
if (SVGURIReference::isKnownAttribute(attrName)) { |
+ SVGElement::InvalidationGuard invalidationGuard(this); |
m_loader->handleSourceAttribute(hrefString()); |
- return; |
+ } else { |
+ SVGElement::svgAttributeChanged(attrName); |
} |
- |
- ASSERT_NOT_REACHED(); |
} |
Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode* rootParent) |