summaryrefslogtreecommitdiffstats
path: root/WebCore/page/animation/KeyframeAnimation.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/page/animation/KeyframeAnimation.cpp
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/page/animation/KeyframeAnimation.cpp')
-rw-r--r--WebCore/page/animation/KeyframeAnimation.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/WebCore/page/animation/KeyframeAnimation.cpp b/WebCore/page/animation/KeyframeAnimation.cpp
index 88a5f6a..3f84de1 100644
--- a/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/WebCore/page/animation/KeyframeAnimation.cpp
@@ -56,9 +56,9 @@ KeyframeAnimation::KeyframeAnimation(const Animation* animation, RenderObject* r
KeyframeAnimation::~KeyframeAnimation()
{
- // Do the cleanup here instead of in the base class so the specialized methods get called
+ // Make sure to tell the renderer that we are ending. This will make sure any accelerated animations are removed.
if (!postActive())
- updateStateMachine(AnimationStateInputEndAnimation, -1);
+ endAnimation(true);
}
void KeyframeAnimation::getKeyframeAnimationInterval(const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
@@ -216,7 +216,8 @@ void KeyframeAnimation::endAnimation(bool reset)
UNUSED_PARAM(reset);
#endif
// Restore the original (unanimated) style
- setChanged(m_object->node());
+ if (!paused())
+ setNeedsStyleRecalc(m_object->node());
}
}
@@ -266,11 +267,11 @@ bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double
return false;
// Schedule event handling
- m_compAnim->animationControllerPriv()->addEventToDispatch(element, eventType, m_keyframes.animationName(), elapsedTime);
+ m_compAnim->animationController()->addEventToDispatch(element, eventType, m_keyframes.animationName(), elapsedTime);
// Restore the original (unanimated) style
if (eventType == eventNames().webkitAnimationEndEvent && element->renderer())
- setChanged(element.get());
+ setNeedsStyleRecalc(element.get());
return true; // Did dispatch an event
}
@@ -352,9 +353,9 @@ void KeyframeAnimation::validateTransformFunctionList()
m_transformFunctionListValid = true;
}
-double KeyframeAnimation::willNeedService()
+double KeyframeAnimation::timeToNextService()
{
- double t = AnimationBase::willNeedService();
+ double t = AnimationBase::timeToNextService();
#if USE(ACCELERATED_COMPOSITING)
if (t != 0 || preActive())
return t;