[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

mrowe at apple.com mrowe at apple.com
Wed Dec 22 17:58:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bab500e56ce318c88459257efa8ef5976933ed47
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 3 21:41:00 2010 +0000

    2010-12-03  Mark Rowe  <mrowe at apple.com>
    
            Reviewed by Eric Seidel.
    
            Animated GIF animates much more slowly in Safari than Firefox
            <rdar://problem/7689300> / <http://webkit.org/b/26455>
    
            Adopt Firefox's behavior for frame duration clamping. Images that specify a frame duration
            of <= 10ms are treated as having a frame duration of 100ms, while all other images use the
            frame duration that they specify.
    
            ImageIO currently implements its own clamping of frame durations (<rdar://problem/7689297>)
            which will result in this change having no observable effect on platforms where it is used
            until an updated version of ImageIO becomes available.
    
            * platform/graphics/ImageSource.cpp:
            (WebCore::ImageSource::frameDurationAtIndex): Update the formatting of the comment and style
            of the code to match that in ImageSourceCG.
            * platform/graphics/cg/ImageSourceCG.cpp:
            (WebCore::ImageSource::frameDurationAtIndex):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73295 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fbd5794..e0834e0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-12-03  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by Eric Seidel.
+
+        Animated GIF animates much more slowly in Safari than Firefox
+        <rdar://problem/7689300> / <http://webkit.org/b/26455>
+
+        Adopt Firefox's behavior for frame duration clamping. Images that specify a frame duration
+        of <= 10ms are treated as having a frame duration of 100ms, while all other images use the
+        frame duration that they specify.
+
+        ImageIO currently implements its own clamping of frame durations (<rdar://problem/7689297>)
+        which will result in this change having no observable effect on platforms where it is used
+        until an updated version of ImageIO becomes available.
+
+        * platform/graphics/ImageSource.cpp:
+        (WebCore::ImageSource::frameDurationAtIndex): Update the formatting of the comment and style
+        of the code to match that in ImageSourceCG.
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        (WebCore::ImageSource::frameDurationAtIndex):
+
 2010-12-03  Chris Rogers  <crogers at google.com>
 
         Unreviewed build fix.
diff --git a/WebCore/platform/graphics/ImageSource.cpp b/WebCore/platform/graphics/ImageSource.cpp
index d1a944a..1fe96f8 100644
--- a/WebCore/platform/graphics/ImageSource.cpp
+++ b/WebCore/platform/graphics/ImageSource.cpp
@@ -153,13 +153,14 @@ float ImageSource::frameDurationAtIndex(size_t index)
     if (!buffer || buffer->status() == RGBA32Buffer::FrameEmpty)
         return 0;
 
-    // Many annoying ads specify a 0 duration to make an image flash as quickly
-    // as possible.  We follow WinIE's behavior and use a duration of 100 ms
-    // for any frames that specify a duration of <= 50 ms.  See
-    // <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for
-    // more.
+    // Many annoying ads specify a 0 duration to make an image flash as quickly as possible.
+    // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify
+    // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082>
+    // for more information.
     const float duration = buffer->duration() / 1000.0f;
-    return (duration < 0.051f) ? 0.100f : duration;
+    if (duration < 0.011f)
+        return 0.100f;
+    return duration;
 }
 
 bool ImageSource::frameHasAlphaAtIndex(size_t index)
diff --git a/WebCore/platform/graphics/cg/ImageSourceCG.cpp b/WebCore/platform/graphics/cg/ImageSourceCG.cpp
index f01c442..29b62d7 100644
--- a/WebCore/platform/graphics/cg/ImageSourceCG.cpp
+++ b/WebCore/platform/graphics/cg/ImageSourceCG.cpp
@@ -308,9 +308,10 @@ float ImageSource::frameDurationAtIndex(size_t index)
     }
 
     // Many annoying ads specify a 0 duration to make an image flash as quickly as possible.
-    // We follow WinIE's behavior and use a duration of 100 ms for any frames that specify
-    // a duration of <= 50 ms. See <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for more.
-    if (duration < 0.051f)
+    // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify
+    // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082>
+    // for more information.
+    if (duration < 0.011f)
         return 0.100f;
     return duration;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list