[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

mrowe at apple.com mrowe at apple.com
Fri Feb 26 22:27:00 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit fc87718a5e3c6b0b73e9867cdd03b687e6a4e91d
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 22 11:18:05 2010 +0000

    REGRESSION (r55039): Animation starts from near end when loaded over slow network
    <http://webkit.org/b/35222> / <rdar://problem/7673523>
    
    Rubber-stamped by Sam Weinig and Maciej Stachowiak.
    
    Roll out r55039 (related to <http://webkit.org/b/35115>) as it causes animated GIFs
    to skip intermediate frames when loading over a slower network.
    
    * platform/graphics/BitmapImage.cpp:
    (WebCore::BitmapImage::startAnimation):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 584d39a..3649446 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-22  Mark Rowe  <mrowe at apple.com>
+
+        Rubber-stamped by Sam Weinig and Maciej Stachowiak.
+
+        REGRESSION (r55039): Animation starts from near end when loaded over slow network
+        <http://webkit.org/b/35222> / <rdar://problem/7673523>
+
+        Roll out r55039 (related to <http://webkit.org/b/35115>) as it causes animated GIFs
+        to skip intermediate frames when loading over a slower network.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::startAnimation):
+
 2010-02-22  Maciej Stachowiak  <mjs at apple.com>
 
         Not reviewed, build fix.
diff --git a/WebCore/platform/graphics/BitmapImage.cpp b/WebCore/platform/graphics/BitmapImage.cpp
index 910d39a..c750541 100644
--- a/WebCore/platform/graphics/BitmapImage.cpp
+++ b/WebCore/platform/graphics/BitmapImage.cpp
@@ -266,11 +266,6 @@ void BitmapImage::startAnimation(bool catchUpIfNecessary)
     if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
         return;
 
-    // If we aren't already animating, set now as the animation start time.
-    const double time = currentTime();
-    if (!m_desiredFrameStartTime)
-        m_desiredFrameStartTime = time;
-
     // Don't advance the animation to an incomplete frame.
     size_t nextFrame = (m_currentFrame + 1) % frameCount();
     if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame))
@@ -287,14 +282,19 @@ void BitmapImage::startAnimation(bool catchUpIfNecessary)
     // in this calculation, we make the animation appear to run at its desired
     // rate regardless of how fast it's being repainted.
     const double currentDuration = frameDurationAtIndex(m_currentFrame);
-    m_desiredFrameStartTime += currentDuration;
-
-    // When an animated image is more than five minutes out of date, the
-    // user probably doesn't care about resyncing and we could burn a lot of
-    // time looping through frames below.  Just reset the timings.
-    const double cAnimationResyncCutoff = 5 * 60;
-    if ((time - m_desiredFrameStartTime) > cAnimationResyncCutoff)
+    const double time = currentTime();
+    if (m_desiredFrameStartTime == 0) {
         m_desiredFrameStartTime = time + currentDuration;
+    } else {
+        m_desiredFrameStartTime += currentDuration;
+
+        // When an animated image is more than five minutes out of date, the
+        // user probably doesn't care about resyncing and we could burn a lot of
+        // time looping through frames below.  Just reset the timings.
+        const double cAnimationResyncCutoff = 5 * 60;
+        if ((time - m_desiredFrameStartTime) > cAnimationResyncCutoff)
+            m_desiredFrameStartTime = time + currentDuration;
+    }
 
     // The image may load more slowly than it's supposed to animate, so that by
     // the time we reach the end of the first repetition, we're well behind.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list