Changeset 73295 in webkit
- Timestamp:
- Dec 3, 2010 1:41:00 PM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73294 r73295 1 2010-12-03 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Eric Seidel. 4 5 Animated GIF animates much more slowly in Safari than Firefox 6 <rdar://problem/7689300> / <http://webkit.org/b/26455> 7 8 Adopt Firefox's behavior for frame duration clamping. Images that specify a frame duration 9 of <= 10ms are treated as having a frame duration of 100ms, while all other images use the 10 frame duration that they specify. 11 12 ImageIO currently implements its own clamping of frame durations (<rdar://problem/7689297>) 13 which will result in this change having no observable effect on platforms where it is used 14 until an updated version of ImageIO becomes available. 15 16 * platform/graphics/ImageSource.cpp: 17 (WebCore::ImageSource::frameDurationAtIndex): Update the formatting of the comment and style 18 of the code to match that in ImageSourceCG. 19 * platform/graphics/cg/ImageSourceCG.cpp: 20 (WebCore::ImageSource::frameDurationAtIndex): 21 1 22 2010-12-03 Chris Rogers <crogers@google.com> 2 23 -
trunk/WebCore/platform/graphics/ImageSource.cpp
r72130 r73295 154 154 return 0; 155 155 156 // Many annoying ads specify a 0 duration to make an image flash as quickly 157 // as possible. We follow WinIE's behavior and use a duration of 100 ms 158 // for any frames that specify a duration of <= 50 ms. See 159 // <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for 160 // more. 156 // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. 157 // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify 158 // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082> 159 // for more information. 161 160 const float duration = buffer->duration() / 1000.0f; 162 return (duration < 0.051f) ? 0.100f : duration; 161 if (duration < 0.011f) 162 return 0.100f; 163 return duration; 163 164 } 164 165 -
trunk/WebCore/platform/graphics/cg/ImageSourceCG.cpp
r72130 r73295 309 309 310 310 // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. 311 // We follow WinIE's behavior and use a duration of 100 ms for any frames that specify 312 // a duration of <= 50 ms. See <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for more. 313 if (duration < 0.051f) 311 // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify 312 // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082> 313 // for more information. 314 if (duration < 0.011f) 314 315 return 0.100f; 315 316 return duration;
Note: See TracChangeset
for help on using the changeset viewer.