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

Side by Side Diff: third_party/WebKit/Source/core/animation/SVGInterpolation.cpp

Issue 1512483004: Simplify and test SVGInterpolation effect application (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove removal Created 5 years 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
(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 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/SVGInterpolation.h ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698