From 86af5f6d35a31ca20a264cdc66bcd88c04d11a92 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Thu, 31 Mar 2011 18:56:54 -0700 Subject: Fix animations bug This solves the problem on the nytimes.com/skimmer website. We were applying the last animation step twice. bug:4181605 Change-Id: Id2c003b5a2b6a8c56aa3d6be76d4a6cccfb86ad8 --- WebCore/platform/graphics/android/AndroidAnimation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'WebCore/platform') diff --git a/WebCore/platform/graphics/android/AndroidAnimation.cpp b/WebCore/platform/graphics/android/AndroidAnimation.cpp index 199db53..be9e0ee 100644 --- a/WebCore/platform/graphics/android/AndroidAnimation.cpp +++ b/WebCore/platform/graphics/android/AndroidAnimation.cpp @@ -230,6 +230,11 @@ bool AndroidOpacityAnimation::evaluate(LayerAndroid* layer, double time) if (progress < 0) // we still want to be evaluated until we get progress > 0 return true; + if (progress >= 1) { + m_finished = true; + return false; + } + // First, we need to get the from and to values int from, to; @@ -293,6 +298,11 @@ bool AndroidTransformAnimation::evaluate(LayerAndroid* layer, double time) if (progress < 0) // we still want to be evaluated until we get progress > 0 return true; + if (progress >= 1) { + m_finished = true; + return false; + } + IntSize size(layer->getSize().width(), layer->getSize().height()); TransformationMatrix matrix; XLOG("Evaluate transforms animations, %d operations, progress %.2f for layer %d (%d, %d)" -- cgit v1.1