From: ap Date: Mon, 18 Sep 2006 05:03:42 +0000 (+0000) Subject: Reviewed by Hyatt. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=1ac6e326cb67e6b883c57cb643904288893f0c21;ds=sidebyside Reviewed by Hyatt. http://bugzilla.opendarwin.org/show_bug.cgi?id=10779 REGRESSION: Animated GIF ignores frame intervals and loops infinitely No test possible. * platform/Image.cpp: (WebCore::Image::shouldAnimate): Don't check that there is more than one frame, maybe the rest just hasn't been loaded yet. (WebCore::Image::startAnimation): Move the frame count check here - there is no need to start animating before we get at least two frames. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16417 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index a208c38fd53e..85663bbb0897 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2006-09-17 Alexey Proskuryakov + + Reviewed by Hyatt. + + http://bugzilla.opendarwin.org/show_bug.cgi?id=10779 + REGRESSION: Animated GIF ignores frame intervals and loops infinitely + + No test possible. + + * platform/Image.cpp: + (WebCore::Image::shouldAnimate): Don't check that there is more than one frame, + maybe the rest just hasn't been loaded yet. + (WebCore::Image::startAnimation): Move the frame count check here - there is no need + to start animating before we get at least two frames. + 2006-09-17 Brady Eidson Reviewed by Sarge diff --git a/WebCore/platform/Image.cpp b/WebCore/platform/Image.cpp index 56c332a0704b..928f1f058a90 100644 --- a/WebCore/platform/Image.cpp +++ b/WebCore/platform/Image.cpp @@ -238,12 +238,12 @@ bool Image::frameHasAlphaAtIndex(size_t index) bool Image::shouldAnimate() { - return (m_animatingImageType && frameCount() > 1 && !m_animationFinished && m_animationObserver); + return (m_animatingImageType && !m_animationFinished && m_animationObserver); } void Image::startAnimation() { - if (m_frameTimer || !shouldAnimate()) + if (m_frameTimer || !shouldAnimate() || frameCount() <= 1) return; m_frameTimer = new Timer(this, &Image::advanceAnimation);