| 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 24 matching lines...) Expand all Loading... |
| 35 : SVGElement(SVGNames::scriptTag, document), | 35 : SVGElement(SVGNames::scriptTag, document), |
| 36 SVGURIReference(this), | 36 SVGURIReference(this), |
| 37 m_loader( | 37 m_loader( |
| 38 ScriptLoader::create(this, wasInsertedByParser, alreadyStarted)) {} | 38 ScriptLoader::create(this, wasInsertedByParser, alreadyStarted)) {} |
| 39 | 39 |
| 40 SVGScriptElement* SVGScriptElement::create(Document& document, | 40 SVGScriptElement* SVGScriptElement::create(Document& document, |
| 41 bool insertedByParser) { | 41 bool insertedByParser) { |
| 42 return new SVGScriptElement(document, insertedByParser, false); | 42 return new SVGScriptElement(document, insertedByParser, false); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void SVGScriptElement::parseAttribute(const QualifiedName& name, | 45 void SVGScriptElement::parseAttribute( |
| 46 const AtomicString& oldValue, | 46 const AttributeModificationParams& params) { |
| 47 const AtomicString& value) { | 47 if (params.name == HTMLNames::onerrorAttr) { |
| 48 if (name == HTMLNames::onerrorAttr) | |
| 49 setAttributeEventListener( | 48 setAttributeEventListener( |
| 50 EventTypeNames::error, | 49 EventTypeNames::error, |
| 51 createAttributeEventListener(this, name, value, eventParameterName())); | 50 createAttributeEventListener(this, params.name, params.newValue, |
| 52 else | 51 eventParameterName())); |
| 53 SVGElement::parseAttribute(name, oldValue, value); | 52 } else { |
| 53 SVGElement::parseAttribute(params); |
| 54 } |
| 54 } | 55 } |
| 55 | 56 |
| 56 void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName) { | 57 void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName) { |
| 57 if (SVGURIReference::isKnownAttribute(attrName)) { | 58 if (SVGURIReference::isKnownAttribute(attrName)) { |
| 58 SVGElement::InvalidationGuard invalidationGuard(this); | 59 SVGElement::InvalidationGuard invalidationGuard(this); |
| 59 m_loader->handleSourceAttribute(hrefString()); | 60 m_loader->handleSourceAttribute(hrefString()); |
| 60 return; | 61 return; |
| 61 } | 62 } |
| 62 | 63 |
| 63 SVGElement::svgAttributeChanged(attrName); | 64 SVGElement::svgAttributeChanged(attrName); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 153 } |
| 153 #endif | 154 #endif |
| 154 | 155 |
| 155 DEFINE_TRACE(SVGScriptElement) { | 156 DEFINE_TRACE(SVGScriptElement) { |
| 156 visitor->trace(m_loader); | 157 visitor->trace(m_loader); |
| 157 SVGElement::trace(visitor); | 158 SVGElement::trace(visitor); |
| 158 SVGURIReference::trace(visitor); | 159 SVGURIReference::trace(visitor); |
| 159 } | 160 } |
| 160 | 161 |
| 161 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |