| Index: Source/core/platform/graphics/GraphicsLayerAnimation.cpp
|
| diff --git a/Source/core/platform/graphics/GraphicsLayerAnimation.cpp b/Source/core/platform/graphics/GraphicsLayerAnimation.cpp
|
| index 7e0865fe88cc4d85f22727d6b9983878ebc934e3..43137b64c6ef41b8c7c39a1c861db96f879ec18d 100644
|
| --- a/Source/core/platform/graphics/GraphicsLayerAnimation.cpp
|
| +++ b/Source/core/platform/graphics/GraphicsLayerAnimation.cpp
|
| @@ -73,16 +73,16 @@ static FilterOperations applyFilterAnimation(const FilterOperations* from, const
|
| return result;
|
| }
|
|
|
| -static bool shouldReverseAnimationValue(CSSAnimationData::AnimationDirection direction, int loopCount)
|
| +static bool shouldReverseAnimationValue(StyleAnimationData::AnimationDirection direction, int loopCount)
|
| {
|
| - if (((direction == CSSAnimationData::AnimationDirectionAlternate) && (loopCount & 1))
|
| - || ((direction == CSSAnimationData::AnimationDirectionAlternateReverse) && !(loopCount & 1))
|
| - || direction == CSSAnimationData::AnimationDirectionReverse)
|
| + if (((direction == StyleAnimationData::AnimationDirectionAlternate) && (loopCount & 1))
|
| + || ((direction == StyleAnimationData::AnimationDirectionAlternateReverse) && !(loopCount & 1))
|
| + || direction == StyleAnimationData::AnimationDirectionReverse)
|
| return true;
|
| return false;
|
| }
|
|
|
| -static double normalizedAnimationValue(double runningTime, double duration, CSSAnimationData::AnimationDirection direction, double iterationCount)
|
| +static double normalizedAnimationValue(double runningTime, double duration, StyleAnimationData::AnimationDirection direction, double iterationCount)
|
| {
|
| if (!duration)
|
| return 0;
|
| @@ -96,11 +96,11 @@ static double normalizedAnimationValue(double runningTime, double duration, CSSA
|
| return shouldReverseAnimationValue(direction, loopCount) ? 1 - normalized : normalized;
|
| }
|
|
|
| -static double normalizedAnimationValueForFillsForwards(double iterationCount, CSSAnimationData::AnimationDirection direction)
|
| +static double normalizedAnimationValueForFillsForwards(double iterationCount, StyleAnimationData::AnimationDirection direction)
|
| {
|
| - if (direction == CSSAnimationData::AnimationDirectionNormal)
|
| + if (direction == StyleAnimationData::AnimationDirectionNormal)
|
| return 1;
|
| - if (direction == CSSAnimationData::AnimationDirectionReverse)
|
| + if (direction == StyleAnimationData::AnimationDirectionReverse)
|
| return 0;
|
| return shouldReverseAnimationValue(direction, iterationCount) ? 1 : 0;
|
| }
|
| @@ -200,7 +200,7 @@ static TransformationMatrix applyTransformAnimation(const TransformOperations* f
|
| return matrix;
|
| }
|
|
|
| -static const TimingFunction* timingFunctionForAnimationValue(const AnimationValue* animValue, const CSSAnimationData* anim)
|
| +static const TimingFunction* timingFunctionForAnimationValue(const AnimationValue* animValue, const StyleAnimationData* anim)
|
| {
|
| if (animValue->timingFunction())
|
| return animValue->timingFunction();
|
| @@ -210,10 +210,10 @@ static const TimingFunction* timingFunctionForAnimationValue(const AnimationValu
|
| return CubicBezierTimingFunction::defaultTimingFunction();
|
| }
|
|
|
| -GraphicsLayerAnimation::GraphicsLayerAnimation(const String& name, const KeyframeValueList& keyframes, const IntSize& boxSize, const CSSAnimationData* animation, double startTime, bool listsMatch)
|
| +GraphicsLayerAnimation::GraphicsLayerAnimation(const String& name, const KeyframeValueList& keyframes, const IntSize& boxSize, const StyleAnimationData* animation, double startTime, bool listsMatch)
|
| : m_keyframes(keyframes)
|
| , m_boxSize(boxSize)
|
| - , m_animation(CSSAnimationData::create(animation))
|
| + , m_animation(StyleAnimationData::create(animation))
|
| , m_name(name)
|
| , m_listsMatch(listsMatch)
|
| , m_startTime(startTime)
|
| @@ -276,7 +276,7 @@ void GraphicsLayerAnimation::apply(Client* client)
|
| double totalRunningTime = computeTotalRunningTime();
|
| double normalizedValue = normalizedAnimationValue(totalRunningTime, m_animation->duration(), m_animation->direction(), m_animation->iterationCount());
|
|
|
| - if (m_animation->iterationCount() != CSSAnimationData::IterationCountInfinite && totalRunningTime >= m_animation->duration() * m_animation->iterationCount()) {
|
| + if (m_animation->iterationCount() != StyleAnimationData::IterationCountInfinite && totalRunningTime >= m_animation->duration() * m_animation->iterationCount()) {
|
| setState(StoppedState);
|
| if (m_animation->fillsForwards())
|
| normalizedValue = normalizedAnimationValueForFillsForwards(m_animation->iterationCount(), m_animation->direction());
|
|
|