| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 inline SVGScriptElement::SVGScriptElement(Document& document, bool wasInsertedBy
Parser, bool alreadyStarted) | 32 inline SVGScriptElement::SVGScriptElement(Document& document, bool wasInsertedBy
Parser, bool alreadyStarted) |
| 33 : SVGElement(SVGNames::scriptTag, document) | 33 : SVGElement(SVGNames::scriptTag, document) |
| 34 , SVGURIReference(this) | 34 , SVGURIReference(this) |
| 35 , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted)) | 35 , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted)) |
| 36 { | 36 { |
| 37 } | 37 } |
| 38 | 38 |
| 39 PassRefPtrWillBeRawPtr<SVGScriptElement> SVGScriptElement::create(Document& docu
ment, bool insertedByParser) | 39 RawPtr<SVGScriptElement> SVGScriptElement::create(Document& document, bool inser
tedByParser) |
| 40 { | 40 { |
| 41 return adoptRefWillBeNoop(new SVGScriptElement(document, insertedByParser, f
alse)); | 41 return new SVGScriptElement(document, insertedByParser, false); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& oldValue, const AtomicString& value) | 44 void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& oldValue, const AtomicString& value) |
| 45 { | 45 { |
| 46 if (name == HTMLNames::onerrorAttr) | 46 if (name == HTMLNames::onerrorAttr) |
| 47 setAttributeEventListener(EventTypeNames::error, createAttributeEventLis
tener(this, name, value, eventParameterName())); | 47 setAttributeEventListener(EventTypeNames::error, createAttributeEventLis
tener(this, name, value, eventParameterName())); |
| 48 else | 48 else |
| 49 SVGElement::parseAttribute(name, oldValue, value); | 49 SVGElement::parseAttribute(name, oldValue, value); |
| 50 } | 50 } |
| 51 | 51 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 bool SVGScriptElement::deferAttributeValue() const | 140 bool SVGScriptElement::deferAttributeValue() const |
| 141 { | 141 { |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool SVGScriptElement::hasSourceAttribute() const | 145 bool SVGScriptElement::hasSourceAttribute() const |
| 146 { | 146 { |
| 147 return href()->isSpecified(); | 147 return href()->isSpecified(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 PassRefPtrWillBeRawPtr<Element> SVGScriptElement::cloneElementWithoutAttributesA
ndChildren() | 150 RawPtr<Element> SVGScriptElement::cloneElementWithoutAttributesAndChildren() |
| 151 { | 151 { |
| 152 return adoptRefWillBeNoop(new SVGScriptElement(document(), false, m_loader->
alreadyStarted())); | 152 return new SVGScriptElement(document(), false, m_loader->alreadyStarted()); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void SVGScriptElement::dispatchLoadEvent() | 155 void SVGScriptElement::dispatchLoadEvent() |
| 156 { | 156 { |
| 157 dispatchEvent(Event::create(EventTypeNames::load)); | 157 dispatchEvent(Event::create(EventTypeNames::load)); |
| 158 } | 158 } |
| 159 | 159 |
| 160 #if ENABLE(ASSERT) | 160 #if ENABLE(ASSERT) |
| 161 bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& name) const | 161 bool SVGScriptElement::isAnimatableAttribute(const QualifiedName& name) const |
| 162 { | 162 { |
| 163 if (name == SVGNames::typeAttr) | 163 if (name == SVGNames::typeAttr) |
| 164 return false; | 164 return false; |
| 165 | 165 |
| 166 return SVGElement::isAnimatableAttribute(name); | 166 return SVGElement::isAnimatableAttribute(name); |
| 167 } | 167 } |
| 168 #endif | 168 #endif |
| 169 | 169 |
| 170 DEFINE_TRACE(SVGScriptElement) | 170 DEFINE_TRACE(SVGScriptElement) |
| 171 { | 171 { |
| 172 visitor->trace(m_loader); | 172 visitor->trace(m_loader); |
| 173 SVGElement::trace(visitor); | 173 SVGElement::trace(visitor); |
| 174 SVGURIReference::trace(visitor); | 174 SVGURIReference::trace(visitor); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |