| Index: Source/core/svg/SVGScriptElement.cpp
|
| diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
|
| index 754f98d219e712f190eb9dab7c917a633ef4a444..b8e797efe3980b143f8f409d85505470128f1320 100644
|
| --- a/Source/core/svg/SVGScriptElement.cpp
|
| +++ b/Source/core/svg/SVGScriptElement.cpp
|
| @@ -43,8 +43,8 @@ END_REGISTER_ANIMATED_PROPERTIES
|
|
|
| inline SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* document, bool wasInsertedByParser, bool alreadyStarted)
|
| : SVGElement(tagName, document)
|
| - , ScriptElement(this, wasInsertedByParser, alreadyStarted)
|
| , m_svgLoadEventTimer(this, &SVGElement::svgLoadEventTimerFired)
|
| + , m_scriptElement(ScriptElement::create(this, wasInsertedByParser, alreadyStarted))
|
| {
|
| ASSERT(hasTagName(SVGNames::scriptTag));
|
| ScriptWrappable::init(this);
|
| @@ -106,7 +106,8 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
|
| return;
|
|
|
| if (SVGURIReference::isKnownAttribute(attrName)) {
|
| - handleSourceAttribute(href());
|
| + if (m_scriptElement)
|
| + m_scriptElement->handleSourceAttribute(href());
|
| return;
|
| }
|
|
|
| @@ -119,7 +120,8 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
|
| Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode* rootParent)
|
| {
|
| SVGElement::insertedInto(rootParent);
|
| - ScriptElement::insertedInto(rootParent);
|
| + if (m_scriptElement)
|
| + m_scriptElement->insertedInto(rootParent);
|
| if (rootParent->inDocument())
|
| SVGExternalResourcesRequired::insertedIntoDocument(this);
|
| return InsertionDone;
|
| @@ -128,7 +130,8 @@ Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode*
|
| void SVGScriptElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
|
| {
|
| SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
|
| - ScriptElement::childrenChanged();
|
| + if (m_scriptElement)
|
| + m_scriptElement->childrenChanged();
|
| }
|
|
|
| bool SVGScriptElement::isURLAttribute(const Attribute& attribute) const
|
| @@ -206,7 +209,7 @@ bool SVGScriptElement::hasSourceAttribute() const
|
|
|
| PassRefPtr<Element> SVGScriptElement::cloneElementWithoutAttributesAndChildren()
|
| {
|
| - return adoptRef(new SVGScriptElement(tagQName(), document(), false, alreadyStarted()));
|
| + return adoptRef(new SVGScriptElement(tagQName(), document(), false, m_scriptElement && m_scriptElement->alreadyStarted()));
|
| }
|
|
|
| }
|
|
|