Changeset 25295 in webkit
- Timestamp:
- Aug 29, 2007 10:34:01 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r25294 r25295 1 2007-08-29 Peter Kasting <zerodpx@gmail.com> 2 3 Reviewed by Maciej. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=15096 6 Move the GIF frame duration minimum check into the various 7 ImageSource*.cpp backends and use the same values as 8 ImageSourceCG.cpp. 9 10 * platform/graphics/cairo/ImageSourceCairo.cpp: 11 (WebCore::ImageSource::frameDurationAtIndex): 12 * platform/graphics/qt/ImageSourceQt.cpp: 13 (WebCore::ImageSource::frameDurationAtIndex): 14 * platform/image-decoders/gif/GIFImageReader.cpp: 15 (GIFImageReader::read): 16 1 17 2007-08-29 Peter Kasting <zerodpx@gmail.com> 2 18 -
trunk/WebCore/platform/graphics/cairo/ImageSourceCairo.cpp
r24014 r25295 183 183 return 0; 184 184 185 return buffer->duration() / 1000.0f; 185 // Many annoying ads specify a 0 duration to make an image flash as quickly 186 // as possible. We follow WinIE's behavior and use a duration of 100 ms 187 // for any frames that specify a duration of <= 50 ms. See 188 // <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for 189 // more. 190 const float duration = buffer->duration() / 1000.0f; 191 return (duration < 0.051f) ? 0.100f : duration; 186 192 } 187 193 -
trunk/WebCore/platform/graphics/qt/ImageSourceQt.cpp
r20428 r25295 171 171 return 0; 172 172 173 return m_decoder->duration(index) / 1000.0f; 173 // Many annoying ads specify a 0 duration to make an image flash as quickly 174 // as possible. We follow WinIE's behavior and use a duration of 100 ms 175 // for any frames that specify a duration of <= 50 ms. See 176 // <http://bugs.webkit.org/show_bug.cgi?id=14413> or Radar 4051389 for 177 // more. 178 const float duration = m_decoder->duration(index) / 1000.0f; 179 return (duration < 0.051f) ? 0.100f : duration; 174 180 } 175 181 -
trunk/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
r20776 r25295 652 652 if (frame_reader->disposal_method == 4) 653 653 frame_reader->disposal_method = (gdispose)3; 654 unsigned short n = GETINT16(q + 1); 655 // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. 656 // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify 657 // a duration of <= 10 ms. See gfxImageFrame::GetTimeout in Gecko or Radar 4051389 for more. 658 frame_reader->delay_time = n <= 1 ? 100 : n * 10; 654 frame_reader->delay_time = GETINT16(q + 1) * 10; 659 655 } 660 656 GETN(1, gif_consume_block);
Note: See TracChangeset
for help on using the changeset viewer.