summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGAnimatedNumberList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGAnimatedNumberList.cpp')
-rw-r--r--Source/WebCore/svg/SVGAnimatedNumberList.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/WebCore/svg/SVGAnimatedNumberList.cpp b/Source/WebCore/svg/SVGAnimatedNumberList.cpp
index a4581dce9..87f973a1b 100644
--- a/Source/WebCore/svg/SVGAnimatedNumberList.cpp
+++ b/Source/WebCore/svg/SVGAnimatedNumberList.cpp
@@ -18,11 +18,9 @@
*/
#include "config.h"
-
-#if ENABLE(SVG)
#include "SVGAnimatedNumberList.h"
-#include "SVGAnimateElement.h"
+#include "SVGAnimateElementBase.h"
#include "SVGAnimatedNumber.h"
namespace WebCore {
@@ -34,7 +32,7 @@ SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator(SVGAnimationElement
std::unique_ptr<SVGAnimatedType> SVGAnimatedNumberListAnimator::constructFromString(const String& string)
{
- auto animatedType = SVGAnimatedType::createNumberList(std::make_unique<SVGNumberList>());
+ auto animatedType = SVGAnimatedType::createNumberList(std::make_unique<SVGNumberListValues>());
animatedType->numberList().parse(string);
return animatedType;
}
@@ -49,7 +47,7 @@ void SVGAnimatedNumberListAnimator::stopAnimValAnimation(const SVGElementAnimate
stopAnimValAnimationForType<SVGAnimatedNumberList>(animatedTypes);
}
-void SVGAnimatedNumberListAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType* type)
+void SVGAnimatedNumberListAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type)
{
resetFromBaseValue<SVGAnimatedNumberList>(animatedTypes, type, &SVGAnimatedType::numberList);
}
@@ -69,8 +67,8 @@ void SVGAnimatedNumberListAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGA
ASSERT(from->type() == AnimatedNumberList);
ASSERT(from->type() == to->type());
- const SVGNumberList& fromNumberList = from->numberList();
- SVGNumberList& toNumberList = to->numberList();
+ const auto& fromNumberList = from->numberList();
+ auto& toNumberList = to->numberList();
unsigned fromNumberListSize = fromNumberList.size();
if (!fromNumberListSize || fromNumberListSize != toNumberList.size())
@@ -84,11 +82,11 @@ void SVGAnimatedNumberListAnimator::calculateAnimatedValue(float percentage, uns
{
ASSERT(m_animationElement);
- const SVGNumberList& fromNumberList = m_animationElement->animationMode() == ToAnimation ? animated->numberList() : from->numberList();
- const SVGNumberList& toNumberList = to->numberList();
- const SVGNumberList& toAtEndOfDurationNumberList = toAtEndOfDuration->numberList();
- SVGNumberList& animatedNumberList = animated->numberList();
- if (!m_animationElement->adjustFromToListValues<SVGNumberList>(fromNumberList, toNumberList, animatedNumberList, percentage))
+ const auto& fromNumberList = m_animationElement->animationMode() == ToAnimation ? animated->numberList() : from->numberList();
+ const auto& toNumberList = to->numberList();
+ const auto& toAtEndOfDurationNumberList = toAtEndOfDuration->numberList();
+ auto& animatedNumberList = animated->numberList();
+ if (!m_animationElement->adjustFromToListValues<SVGNumberListValues>(fromNumberList, toNumberList, animatedNumberList, percentage))
return;
unsigned fromNumberListSize = fromNumberList.size();
@@ -104,10 +102,8 @@ void SVGAnimatedNumberListAnimator::calculateAnimatedValue(float percentage, uns
float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const String&)
{
- // FIXME: Distance calculation is not possible for SVGNumberList right now. We need the distance for every single value.
+ // FIXME: Distance calculation is not possible for SVGNumberListValues right now. We need the distance for every single value.
return -1;
}
}
-
-#endif // ENABLE(SVG)