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

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.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 | « third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
index 323c800abc7cdb5bc72d8eb69382226eff1413e7..c91afc058aeac21cb6c3db2484dc589217c79a3d 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
@@ -143,52 +143,32 @@ SVGPropertyBase* SVGAnimatedTypeAnimator::createPropertyForAnimation(const Strin
return nullptr;
}
-SVGPropertyBase* SVGAnimatedTypeAnimator::constructFromString(const String& value)
+SVGPropertyBase* SVGAnimatedTypeAnimator::createAnimatedValueFromString(const String& value)
{
return createPropertyForAnimation(value);
}
void SVGAnimatedTypeAnimator::calculateFromAndToValues(Member<SVGPropertyBase>& from, Member<SVGPropertyBase>& to, const String& fromString, const String& toString)
{
- from = constructFromString(fromString);
- to = constructFromString(toString);
+ from = createAnimatedValueFromString(fromString);
+ to = createAnimatedValueFromString(toString);
}
void SVGAnimatedTypeAnimator::calculateFromAndByValues(Member<SVGPropertyBase>& from, Member<SVGPropertyBase>& to, const String& fromString, const String& byString)
{
- from = constructFromString(fromString);
- to = constructFromString(byString);
+ from = createAnimatedValueFromString(fromString);
+ to = createAnimatedValueFromString(byString);
to->add(from, m_contextElement);
}
-SVGPropertyBase* SVGAnimatedTypeAnimator::resetAnimation()
+SVGPropertyBase* SVGAnimatedTypeAnimator::createAnimatedValue()
{
DCHECK(isAnimatingSVGDom());
- DCHECK(m_contextElement);
SVGPropertyBase* animatedValue = m_animatedProperty->createAnimatedValue();
DCHECK_EQ(animatedValue->type(), m_type);
- m_contextElement->setAnimatedAttribute(m_animatedProperty->attributeName(), animatedValue);
return animatedValue;
}
-SVGPropertyBase* SVGAnimatedTypeAnimator::startAnimValAnimation()
-{
- return resetAnimation();
-}
-
-void SVGAnimatedTypeAnimator::stopAnimValAnimation()
-{
- if (!isAnimatingSVGDom())
- return;
- DCHECK(m_contextElement);
- m_contextElement->clearAnimatedAttribute(m_animatedProperty->attributeName());
-}
-
-SVGPropertyBase* SVGAnimatedTypeAnimator::resetAnimValToBaseVal()
-{
- return resetAnimation();
-}
-
class ParsePropertyFromString {
STACK_ALLOCATED();
public:
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698