| Index: Source/core/svg/SVGScriptElement.cpp
|
| diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
|
| index 7099c20162db9cee840f2c67764eba2482361cfd..0cccde24c53001d8b2d0d668da8b2aca347eeff9 100644
|
| --- a/Source/core/svg/SVGScriptElement.cpp
|
| +++ b/Source/core/svg/SVGScriptElement.cpp
|
| @@ -49,56 +49,23 @@ 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;
|
| }
|
|
|
| - ASSERT_NOT_REACHED();
|
| + SVGElement::svgAttributeChanged(attrName);
|
| }
|
|
|
| Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode* rootParent)
|
|
|