diff options
Diffstat (limited to 'Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp b/Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp index 7fe5d386a..801025b45 100644 --- a/Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp +++ b/Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.cpp @@ -18,11 +18,9 @@ */ #include "config.h" - -#if ENABLE(SVG) #include "SVGAnimatedPreserveAspectRatio.h" -#include "SVGAnimateElement.h" +#include "SVGAnimateElementBase.h" namespace WebCore { @@ -33,7 +31,7 @@ SVGAnimatedPreserveAspectRatioAnimator::SVGAnimatedPreserveAspectRatioAnimator(S std::unique_ptr<SVGAnimatedType> SVGAnimatedPreserveAspectRatioAnimator::constructFromString(const String& string) { - auto animatedType = SVGAnimatedType::createPreserveAspectRatio(std::make_unique<SVGPreserveAspectRatio>()); + auto animatedType = SVGAnimatedType::createPreserveAspectRatio(std::make_unique<SVGPreserveAspectRatioValue>()); animatedType->preserveAspectRatio().parse(string); return animatedType; } @@ -48,7 +46,7 @@ void SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation(const SVGEleme stopAnimValAnimationForType<SVGAnimatedPreserveAspectRatio>(animatedTypes); } -void SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType* type) +void SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type) { resetFromBaseValue<SVGAnimatedPreserveAspectRatio>(animatedTypes, type, &SVGAnimatedType::preserveAspectRatio); } @@ -73,11 +71,11 @@ void SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue(float percen ASSERT(m_animationElement); ASSERT(m_contextElement); - const SVGPreserveAspectRatio& fromPreserveAspectRatio = m_animationElement->animationMode() == ToAnimation ? animated->preserveAspectRatio() : from->preserveAspectRatio(); - const SVGPreserveAspectRatio& toPreserveAspectRatio = to->preserveAspectRatio(); - SVGPreserveAspectRatio& animatedPreserveAspectRatio = animated->preserveAspectRatio(); + const auto& fromPreserveAspectRatio = m_animationElement->animationMode() == ToAnimation ? animated->preserveAspectRatio() : from->preserveAspectRatio(); + const auto& toPreserveAspectRatio = to->preserveAspectRatio(); + auto& animatedPreserveAspectRatio = animated->preserveAspectRatio(); - m_animationElement->animateDiscreteType<SVGPreserveAspectRatio>(percentage, fromPreserveAspectRatio, toPreserveAspectRatio, animatedPreserveAspectRatio); + m_animationElement->animateDiscreteType<SVGPreserveAspectRatioValue>(percentage, fromPreserveAspectRatio, toPreserveAspectRatio, animatedPreserveAspectRatio); } float SVGAnimatedPreserveAspectRatioAnimator::calculateDistance(const String&, const String&) @@ -87,5 +85,3 @@ float SVGAnimatedPreserveAspectRatioAnimator::calculateDistance(const String&, c } } - -#endif // ENABLE(SVG) |