| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/css/CSSCursorImageValue.h" | 35 #include "core/css/CSSCursorImageValue.h" |
| 36 #include "core/css/resolver/StyleResolver.h" | 36 #include "core/css/resolver/StyleResolver.h" |
| 37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 38 #include "core/dom/ElementTraversal.h" | 38 #include "core/dom/ElementTraversal.h" |
| 39 #include "core/dom/shadow/ShadowRoot.h" | 39 #include "core/dom/shadow/ShadowRoot.h" |
| 40 #include "core/events/Event.h" | 40 #include "core/events/Event.h" |
| 41 #include "core/frame/Settings.h" | 41 #include "core/frame/Settings.h" |
| 42 #include "core/html/HTMLElement.h" | 42 #include "core/html/HTMLElement.h" |
| 43 #include "core/layout/LayoutObject.h" | 43 #include "core/layout/LayoutObject.h" |
| 44 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 44 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| 45 #include "core/svg/SVGAnimateElement.h" | |
| 46 #include "core/svg/SVGCursorElement.h" | 45 #include "core/svg/SVGCursorElement.h" |
| 47 #include "core/svg/SVGDocumentExtensions.h" | 46 #include "core/svg/SVGDocumentExtensions.h" |
| 48 #include "core/svg/SVGElementRareData.h" | 47 #include "core/svg/SVGElementRareData.h" |
| 49 #include "core/svg/SVGGraphicsElement.h" | 48 #include "core/svg/SVGGraphicsElement.h" |
| 50 #include "core/svg/SVGSVGElement.h" | 49 #include "core/svg/SVGSVGElement.h" |
| 51 #include "core/svg/SVGTitleElement.h" | 50 #include "core/svg/SVGTitleElement.h" |
| 52 #include "core/svg/SVGUseElement.h" | 51 #include "core/svg/SVGUseElement.h" |
| 53 #include "core/svg/properties/SVGProperty.h" | 52 #include "core/svg/properties/SVGProperty.h" |
| 54 #include "wtf/AutoReset.h" | 53 #include "wtf/AutoReset.h" |
| 55 #include "wtf/Threading.h" | 54 #include "wtf/Threading.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 static inline void notifyAnimValChanged(SVGElement* targetElement, const Qualifi
edName& attributeName) | 239 static inline void notifyAnimValChanged(SVGElement* targetElement, const Qualifi
edName& attributeName) |
| 241 { | 240 { |
| 242 targetElement->invalidateSVGAttributes(); | 241 targetElement->invalidateSVGAttributes(); |
| 243 targetElement->svgAttributeChanged(attributeName); | 242 targetElement->svgAttributeChanged(attributeName); |
| 244 } | 243 } |
| 245 | 244 |
| 246 template<typename T> | 245 template<typename T> |
| 247 static void forSelfAndInstances(SVGElement* element, T callback) | 246 static void forSelfAndInstances(SVGElement* element, T callback) |
| 248 { | 247 { |
| 249 SVGElement::InstanceUpdateBlocker blocker(element); | 248 SVGElement::InstanceUpdateBlocker blocker(element); |
| 250 for (SVGElement* instance : SVGAnimateElement::findElementInstances(element)
) | 249 callback(element); |
| 250 for (SVGElement* instance : element->instancesForElement()) |
| 251 callback(instance); | 251 callback(instance); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void SVGElement::setWebAnimatedAttribute(const QualifiedName& attribute, SVGProp
ertyBase* value) | 254 void SVGElement::setWebAnimatedAttribute(const QualifiedName& attribute, SVGProp
ertyBase* value) |
| 255 { | 255 { |
| 256 forSelfAndInstances(this, [&attribute, &value](SVGElement* element) { | 256 forSelfAndInstances(this, [&attribute, &value](SVGElement* element) { |
| 257 if (SVGAnimatedPropertyBase* animatedProperty = element->propertyFromAtt
ribute(attribute)) { | 257 if (SVGAnimatedPropertyBase* animatedProperty = element->propertyFromAtt
ribute(attribute)) { |
| 258 animatedProperty->setAnimatedValue(value); | 258 animatedProperty->setAnimatedValue(value); |
| 259 notifyAnimValChanged(element, attribute); | 259 notifyAnimValChanged(element, attribute); |
| 260 } | 260 } |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 Element::trace(visitor); | 1208 Element::trace(visitor); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 const AtomicString& SVGElement::eventParameterName() | 1211 const AtomicString& SVGElement::eventParameterName() |
| 1212 { | 1212 { |
| 1213 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1213 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
| 1214 return evtString; | 1214 return evtString; |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 } // namespace blink | 1217 } // namespace blink |
| OLD | NEW |