diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-03-31 18:56:54 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-03-31 18:56:54 -0700 |
commit | 86af5f6d35a31ca20a264cdc66bcd88c04d11a92 (patch) | |
tree | 0bc8a0903d44471a877ea5460795c9e880f8b6a5 /WebCore/platform/graphics/android | |
parent | bd14a6fcc48d3d5713574a34c441f84296a03c0b (diff) | |
download | external_webkit-86af5f6d35a31ca20a264cdc66bcd88c04d11a92.zip external_webkit-86af5f6d35a31ca20a264cdc66bcd88c04d11a92.tar.gz external_webkit-86af5f6d35a31ca20a264cdc66bcd88c04d11a92.tar.bz2 |
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
Diffstat (limited to 'WebCore/platform/graphics/android')
-rw-r--r-- | WebCore/platform/graphics/android/AndroidAnimation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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)" |