Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGScriptElement.cpp

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGScriptElement.h ('k') | third_party/WebKit/Source/core/svg/SVGStyleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698