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

Unified Diff: Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp

Issue 183143002: Remove SVGAnimatedType (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missed one rename. Created 6 years, 10 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 | « Source/core/svg/SVGAnimatedNewPropertyAnimator.h ('k') | Source/core/svg/SVGAnimatedType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
diff --git a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
index cec9f453cf233e319b31aa95e31cf89be898d62b..e3077a3857d4acf749debf5cb306d7c77fccd323 100644
--- a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
+++ b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
@@ -138,9 +138,9 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyFor
return nullptr;
}
-PassOwnPtr<SVGAnimatedType> SVGAnimatedNewPropertyAnimator::constructFromString(const String& value)
+PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::constructFromString(const String& value)
{
- return SVGAnimatedType::createNewProperty(createPropertyForAnimation(value));
+ return createPropertyForAnimation(value);
}
namespace {
@@ -183,14 +183,14 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::resetAnimation(co
return animatedValue.release();
}
-PassOwnPtr<SVGAnimatedType> SVGAnimatedNewPropertyAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& list)
+PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& list)
{
ASSERT(isAnimatingSVGDom());
SVGElementInstance::InstanceUpdateBlocker blocker(m_contextElement);
invokeMethodOnAllTargetProperties(list, m_animatedProperty->attributeName(), &NewSVGAnimatedPropertyBase::animationStarted);
- return SVGAnimatedType::createNewProperty(resetAnimation(list));
+ return resetAnimation(list);
}
void SVGAnimatedNewPropertyAnimator::stopAnimValAnimation(const SVGElementAnimatedPropertyList& list)
@@ -201,11 +201,11 @@ void SVGAnimatedNewPropertyAnimator::stopAnimValAnimation(const SVGElementAnimat
invokeMethodOnAllTargetProperties(list, m_animatedProperty->attributeName(), &NewSVGAnimatedPropertyBase::animationEnded);
}
-void SVGAnimatedNewPropertyAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& list, SVGAnimatedType* animated)
+PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& list)
{
SVGElementInstance::InstanceUpdateBlocker blocker(m_contextElement);
- animated->newProperty() = resetAnimation(list);
+ return resetAnimation(list);
}
void SVGAnimatedNewPropertyAnimator::animValWillChange(const SVGElementAnimatedPropertyList& list)
@@ -224,11 +224,6 @@ void SVGAnimatedNewPropertyAnimator::animValDidChange(const SVGElementAnimatedPr
invokeMethodOnAllTargetProperties(list, m_animatedProperty->attributeName(), &NewSVGAnimatedPropertyBase::animValDidChange);
}
-void SVGAnimatedNewPropertyAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnimatedType* to)
-{
- to->newProperty()->add(from->newProperty(), m_contextElement);
-}
-
class ParsePropertyFromString {
public:
explicit ParsePropertyFromString(SVGAnimatedNewPropertyAnimator* animator)
@@ -245,15 +240,15 @@ private:
SVGAnimatedNewPropertyAnimator* m_animator;
};
-void SVGAnimatedNewPropertyAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType* toAtEndOfDuration, SVGAnimatedType* animated)
+void SVGAnimatedNewPropertyAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, NewSVGPropertyBase* from, NewSVGPropertyBase* to, NewSVGPropertyBase* toAtEndOfDuration, NewSVGPropertyBase* animated)
{
ASSERT(m_animationElement);
ASSERT(m_contextElement);
- RefPtr<NewSVGPropertyBase> fromValue = m_animationElement->animationMode() == ToAnimation ? animated->newProperty() : from->newProperty();
- RefPtr<NewSVGPropertyBase> toValue = to->newProperty();
- RefPtr<NewSVGPropertyBase> toAtEndOfDurationValue = toAtEndOfDuration->newProperty();
- RefPtr<NewSVGPropertyBase> animatedValue = animated->newProperty();
+ RefPtr<NewSVGPropertyBase> fromValue = m_animationElement->animationMode() == ToAnimation ? animated : from;
+ RefPtr<NewSVGPropertyBase> toValue = to;
+ RefPtr<NewSVGPropertyBase> toAtEndOfDurationValue = toAtEndOfDuration;
+ RefPtr<NewSVGPropertyBase> animatedValue = animated;
// Apply CSS inheritance rules.
ParsePropertyFromString parsePropertyFromString(this);
« no previous file with comments | « Source/core/svg/SVGAnimatedNewPropertyAnimator.h ('k') | Source/core/svg/SVGAnimatedType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698