| 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 15 matching lines...) Expand all Loading... |
| 26 #include "bindings/core/v8/ScriptEventListener.h" | 26 #include "bindings/core/v8/ScriptEventListener.h" |
| 27 #include "core/HTMLNames.h" | 27 #include "core/HTMLNames.h" |
| 28 #include "core/SVGNames.h" | 28 #include "core/SVGNames.h" |
| 29 #include "core/XLinkNames.h" | 29 #include "core/XLinkNames.h" |
| 30 #include "core/XMLNames.h" | 30 #include "core/XMLNames.h" |
| 31 #include "core/animation/AnimationStack.h" | 31 #include "core/animation/AnimationStack.h" |
| 32 #include "core/animation/DocumentAnimations.h" | 32 #include "core/animation/DocumentAnimations.h" |
| 33 #include "core/animation/ElementAnimations.h" | 33 #include "core/animation/ElementAnimations.h" |
| 34 #include "core/animation/InterpolationEnvironment.h" | 34 #include "core/animation/InterpolationEnvironment.h" |
| 35 #include "core/animation/InvalidatableInterpolation.h" | 35 #include "core/animation/InvalidatableInterpolation.h" |
| 36 #include "core/animation/SVGInterpolation.h" | |
| 37 #include "core/css/CSSCursorImageValue.h" | 36 #include "core/css/CSSCursorImageValue.h" |
| 38 #include "core/css/resolver/StyleResolver.h" | 37 #include "core/css/resolver/StyleResolver.h" |
| 39 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
| 40 #include "core/dom/ElementTraversal.h" | 39 #include "core/dom/ElementTraversal.h" |
| 41 #include "core/dom/shadow/ShadowRoot.h" | 40 #include "core/dom/shadow/ShadowRoot.h" |
| 42 #include "core/events/Event.h" | 41 #include "core/events/Event.h" |
| 43 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
| 44 #include "core/html/HTMLElement.h" | 43 #include "core/html/HTMLElement.h" |
| 45 #include "core/layout/LayoutObject.h" | 44 #include "core/layout/LayoutObject.h" |
| 46 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 45 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 { | 252 { |
| 254 return propertyHandle.isSVGAttribute(); | 253 return propertyHandle.isSVGAttribute(); |
| 255 } | 254 } |
| 256 | 255 |
| 257 void SVGElement::applyActiveWebAnimations() | 256 void SVGElement::applyActiveWebAnimations() |
| 258 { | 257 { |
| 259 ActiveInterpolationsMap activeInterpolationsMap = AnimationStack::activeInte
rpolations( | 258 ActiveInterpolationsMap activeInterpolationsMap = AnimationStack::activeInte
rpolations( |
| 260 &elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect
::DefaultPriority, isSVGAttributeHandle); | 259 &elementAnimations()->animationStack(), nullptr, nullptr, KeyframeEffect
::DefaultPriority, isSVGAttributeHandle); |
| 261 for (auto& entry : activeInterpolationsMap) { | 260 for (auto& entry : activeInterpolationsMap) { |
| 262 const QualifiedName& attribute = entry.key.svgAttribute(); | 261 const QualifiedName& attribute = entry.key.svgAttribute(); |
| 263 const Interpolation& interpolation = *entry.value.first(); | 262 InterpolationEnvironment environment(*this, propertyFromAttribute(attrib
ute)->baseValueBase()); |
| 264 if (interpolation.isInvalidatableInterpolation()) { | 263 InvalidatableInterpolation::applyStack(entry.value, environment); |
| 265 InterpolationEnvironment environment(*this, propertyFromAttribute(at
tribute)->baseValueBase()); | |
| 266 InvalidatableInterpolation::applyStack(entry.value, environment); | |
| 267 } else { | |
| 268 // TODO(alancutter): Remove this old code path once animations have
completely migrated to InterpolationTypes. | |
| 269 toSVGInterpolation(interpolation).apply(*this); | |
| 270 } | |
| 271 } | 264 } |
| 272 svgRareData()->setWebAnimatedAttributesDirty(false); | 265 svgRareData()->setWebAnimatedAttributesDirty(false); |
| 273 } | 266 } |
| 274 | 267 |
| 275 template<typename T> | 268 template<typename T> |
| 276 static void updateInstancesAnimatedAttribute(SVGElement* element, const Qualifie
dName& attribute, T callback) | 269 static void updateInstancesAnimatedAttribute(SVGElement* element, const Qualifie
dName& attribute, T callback) |
| 277 { | 270 { |
| 278 SVGElement::InstanceUpdateBlocker blocker(element); | 271 SVGElement::InstanceUpdateBlocker blocker(element); |
| 279 for (SVGElement* instance : SVGAnimateElement::findElementInstances(element)
) { | 272 for (SVGElement* instance : SVGAnimateElement::findElementInstances(element)
) { |
| 280 if (SVGAnimatedPropertyBase* animatedProperty = instance->propertyFromAt
tribute(attribute)) { | 273 if (SVGAnimatedPropertyBase* animatedProperty = instance->propertyFromAt
tribute(attribute)) { |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 Element::trace(visitor); | 1234 Element::trace(visitor); |
| 1242 } | 1235 } |
| 1243 | 1236 |
| 1244 const AtomicString& SVGElement::eventParameterName() | 1237 const AtomicString& SVGElement::eventParameterName() |
| 1245 { | 1238 { |
| 1246 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); | 1239 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt", AtomicString::Con
structFromLiteral)); |
| 1247 return evtString; | 1240 return evtString; |
| 1248 } | 1241 } |
| 1249 | 1242 |
| 1250 } // namespace blink | 1243 } // namespace blink |
| OLD | NEW |