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

Unified Diff: third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp

Issue 1474263002: Clear SVG Web Animation effects when animations exit their fill phase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgPathInterpolationType
Patch Set: Check rare data Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
index f99ca0abceb55615d278d70432eff28ddf79fcc0..a628ad47d72fef3d45a0654edfc7be61e1774b5b 100644
--- a/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGInterpolationType.cpp
@@ -7,7 +7,8 @@
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
-#include "core/svg/SVGAnimateElement.h"
+#include "core/svg/SVGElement.h"
+#include "core/svg/properties/SVGProperty.h"
namespace blink {
@@ -27,17 +28,7 @@ PassOwnPtr<InterpolationValue> SVGInterpolationType::maybeConvertUnderlyingValue
void SVGInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableValue, InterpolationEnvironment& environment) const
{
- SVGElement& targetElement = environment.svgElement();
- SVGElement::InstanceUpdateBlocker blocker(&targetElement);
- RefPtrWillBeRawPtr<SVGPropertyBase> appliedValue = appliedSVGValue(interpolableValue, nonInterpolableValue);
- for (SVGElement* instance : SVGAnimateElement::findElementInstances(&targetElement)) {
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = instance->propertyFromAttribute(attribute());
- if (animatedProperty) {
- animatedProperty->setAnimatedValue(appliedValue);
- instance->invalidateSVGAttributes();
- instance->svgAttributeChanged(attribute());
- }
- }
+ environment.svgElement().setWebAnimatedAttribute(attribute(), appliedSVGValue(interpolableValue, nonInterpolableValue));
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/animation/KeyframeEffect.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698