Show
Ignore:
Timestamp:
02/18/10 13:55:47 (7 months ago)
Author:
gpenin
Message:

merge with webkit revision 54942

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/BAL/Graphics/WebCore/WK/BCBitmapImageWK.cpp

    r1365 r1380  
    267267        return; 
    268268 
     269    // Don't advance the animation to an incomplete frame. 
     270    size_t nextFrame = (m_currentFrame + 1) % frameCount(); 
     271    if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame)) 
     272        return; 
     273 
     274    // Don't advance past the last frame if we haven't decoded the whole image 
     275    // yet and our repetition count is potentially unset.  The repetition count 
     276    // in a GIF can potentially come after all the rest of the image data, so 
     277    // wait on it. 
     278    if (!m_allDataReceived && repetitionCount(false) == cAnimationLoopOnce && m_currentFrame >= (frameCount() - 1)) 
     279        return; 
     280 
    269281    // Determine time for next frame to start.  By ignoring paint and timer lag 
    270282    // in this calculation, we make the animation appear to run at its desired 
     
    284296            m_desiredFrameStartTime = time + currentDuration; 
    285297    } 
    286  
    287     // Don't advance the animation to an incomplete frame. 
    288     size_t nextFrame = (m_currentFrame + 1) % frameCount(); 
    289     if (!m_allDataReceived && !frameIsCompleteAtIndex(nextFrame)) 
    290         return; 
    291  
    292     // Don't advance past the last frame if we haven't decoded the whole image 
    293     // yet and our repetition count is potentially unset.  The repetition count 
    294     // in a GIF can potentially come after all the rest of the image data, so 
    295     // wait on it. 
    296     if (!m_allDataReceived && repetitionCount(false) == cAnimationLoopOnce && m_currentFrame >= (frameCount() - 1)) 
    297         return; 
    298298 
    299299    // The image may load more slowly than it's supposed to animate, so that by