Reviewed by Hyatt.
[WebKit-https.git] / WebCore / platform / Image.cpp
index 56c332a0704bc6c12e9b46fd527ccb9d629daab8..928f1f058a90e22dc828d6320aef79c5d093f2ba 100644 (file)
@@ -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<Image>(this, &Image::advanceAnimation);