diff options
Diffstat (limited to 'Source/WebCore/svg/SVGAnimatedPointList.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGAnimatedPointList.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/Source/WebCore/svg/SVGAnimatedPointList.cpp b/Source/WebCore/svg/SVGAnimatedPointList.cpp index e02c5dc46..5f0780d52 100644 --- a/Source/WebCore/svg/SVGAnimatedPointList.cpp +++ b/Source/WebCore/svg/SVGAnimatedPointList.cpp @@ -18,13 +18,12 @@ */ #include "config.h" - -#if ENABLE(SVG) #include "SVGAnimatedPointList.h" -#include "SVGAnimateElement.h" +#include "SVGAnimateElementBase.h" #include "SVGParserUtilities.h" -#include "SVGPointList.h" +#include "SVGPoint.h" +#include "SVGPointListValues.h" namespace WebCore { @@ -35,7 +34,7 @@ SVGAnimatedPointListAnimator::SVGAnimatedPointListAnimator(SVGAnimationElement* std::unique_ptr<SVGAnimatedType> SVGAnimatedPointListAnimator::constructFromString(const String& string) { - auto animatedType = SVGAnimatedType::createPointList(std::make_unique<SVGPointList>()); + auto animatedType = SVGAnimatedType::createPointList(std::make_unique<SVGPointListValues>()); pointsListFromSVGData(animatedType->pointList(), string); return animatedType; } @@ -50,7 +49,7 @@ void SVGAnimatedPointListAnimator::stopAnimValAnimation(const SVGElementAnimated stopAnimValAnimationForType<SVGAnimatedPointList>(animatedTypes); } -void SVGAnimatedPointListAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType* type) +void SVGAnimatedPointListAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type) { resetFromBaseValue<SVGAnimatedPointList>(animatedTypes, type, &SVGAnimatedType::pointList); } @@ -70,8 +69,8 @@ void SVGAnimatedPointListAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAn ASSERT(from->type() == AnimatedPoints); ASSERT(from->type() == to->type()); - const SVGPointList& fromPointList = from->pointList(); - SVGPointList& toPointList = to->pointList(); + const auto& fromPointList = from->pointList(); + auto& toPointList = to->pointList(); unsigned fromPointListSize = fromPointList.size(); if (!fromPointListSize || fromPointListSize != toPointList.size()) @@ -85,11 +84,11 @@ void SVGAnimatedPointListAnimator::calculateAnimatedValue(float percentage, unsi { ASSERT(m_animationElement); - const SVGPointList& fromPointList = m_animationElement->animationMode() == ToAnimation ? animated->pointList() : from->pointList(); - const SVGPointList& toPointList = to->pointList(); - const SVGPointList& toAtEndOfDurationPointList = toAtEndOfDuration->pointList(); - SVGPointList& animatedPointList = animated->pointList(); - if (!m_animationElement->adjustFromToListValues<SVGPointList>(fromPointList, toPointList, animatedPointList, percentage)) + const auto& fromPointList = m_animationElement->animationMode() == ToAnimation ? animated->pointList() : from->pointList(); + const auto& toPointList = to->pointList(); + const auto& toAtEndOfDurationPointList = toAtEndOfDuration->pointList(); + auto& animatedPointList = animated->pointList(); + if (!m_animationElement->adjustFromToListValues<SVGPointListValues>(fromPointList, toPointList, animatedPointList, percentage)) return; unsigned fromPointListSize = fromPointList.size(); @@ -112,10 +111,8 @@ void SVGAnimatedPointListAnimator::calculateAnimatedValue(float percentage, unsi float SVGAnimatedPointListAnimator::calculateDistance(const String&, const String&) { - // FIXME: Distance calculation is not possible for SVGPointList right now. We need the distance of for every single value. + // FIXME: Distance calculation is not possible for SVGPointListValues right now. We need the distance of for every single value. return -1; } } - -#endif // ENABLE(SVG) |