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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp

Issue 2284263002: Simplify SVGAnimatedTypeAnimator interface (Closed)
Patch Set: Created 4 years, 4 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
index afe5581406b860ada890b996b0bde38ac6874459..7fe46f132f058e2a40b1f68ff7a2f79db7e2dcc9 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp
@@ -122,7 +122,7 @@ bool SVGAnimateElement::calculateToAtEndOfDurationValue(const String& toAtEndOfD
{
if (toAtEndOfDurationString.isEmpty())
return false;
- m_toAtEndOfDurationProperty = m_animator.constructFromString(toAtEndOfDurationString);
+ m_toAtEndOfDurationProperty = m_animator.createAnimatedValueFromString(toAtEndOfDurationString);
return true;
}
@@ -188,11 +188,8 @@ void SVGAnimateElement::resetAnimatedType()
for (SVGElement* element : animatedElements)
addReferenceTo(element);
- if (!m_animatedProperty)
- m_animatedProperty = m_animator.startAnimValAnimation();
- else
- m_animatedProperty = m_animator.resetAnimValToBaseVal();
-
+ m_animatedProperty = m_animator.createAnimatedValue();
+ targetElement->setAnimatedAttribute(attributeName, m_animatedProperty);
return;
}
DCHECK_EQ(shouldApply, ApplyCSSAnimation);
@@ -202,7 +199,7 @@ void SVGAnimateElement::resetAnimatedType()
DCHECK(isTargetAttributeCSSProperty(targetElement, attributeName));
computeCSSPropertyValue(targetElement, cssPropertyID(attributeName.localName()), baseValue);
- m_animatedProperty = m_animator.constructFromString(baseValue);
+ m_animatedProperty = m_animator.createAnimatedValueFromString(baseValue);
}
void SVGAnimateElement::clearAnimatedType()
@@ -232,7 +229,7 @@ void SVGAnimateElement::clearAnimatedType()
}
if (shouldApply == ApplyXMLandCSSAnimation || m_animator.isAnimatingSVGDom()) {
// SVG DOM animVal animation code-path.
- m_animator.stopAnimValAnimation();
+ targetElement->clearAnimatedAttribute(attributeName());
if (shouldApply != DontApplyAnimation)
targetElement->invalidateAnimatedAttribute(attributeName());
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698