2009-02-05 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Anders Carlsson

        getAnimatedStyleForRenderer() should not create a new
        CompositeAnimation if the object isn't already animating, and
        it should just fall back to returning renderer->style().

        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2b88e782
2009-02-05 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson
getAnimatedStyleForRenderer() should not create a new
CompositeAnimation if the object isn't already animating, and
it should just fall back to returning renderer->style().
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
2009-02-05 Simon Fraser <simon.fraser@apple.com>
Fix build when ACCELERATED_COMPOSITING is turned on.
......@@ -270,11 +270,16 @@ double AnimationControllerPrivate::beginAnimationUpdateTime()
PassRefPtr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderObject* renderer)
{
if (!renderer)
return 0;
RefPtr<CompositeAnimation> rendererAnimations = m_compositeAnimations.get(renderer);
if (!rendererAnimations)
return renderer->style();
// Make sure animationUpdateTime is updated, so that it is current even if no
// styleChange has happened (e.g. accelerated animations)
// styleChange has happened (e.g. accelerated animations).
setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
RefPtr<CompositeAnimation> rendererAnimations = accessCompositeAnimation(renderer);
return rendererAnimations->getAnimatedStyle();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment