| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "core/animation/SVGInterpolation.h" | |
| 7 | |
| 8 #include "core/svg/SVGAnimateElement.h" // findElementInstances | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 void SVGInterpolation::apply(SVGElement& targetElement) const | |
| 13 { | |
| 14 SVGElement::InstanceUpdateBlocker blocker(&targetElement); | |
| 15 RefPtrWillBeRawPtr<SVGPropertyBase> value = interpolatedValue(targetElement)
; | |
| 16 SVGElementInstances instances = SVGAnimateElement::findElementInstances(&tar
getElement); | |
| 17 | |
| 18 for (SVGElement* element : instances) { | |
| 19 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = | |
| 20 element->propertyFromAttribute(attributeName()); | |
| 21 if (animatedProperty) { | |
| 22 animatedProperty->setAnimatedValue(value); | |
| 23 element->invalidateSVGAttributes(); | |
| 24 element->svgAttributeChanged(attributeName()); | |
| 25 } | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 } | |
| OLD | NEW |