Show
Ignore:
Timestamp:
08/15/08 13:25:16 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35774

Files:

Legend:

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

    r298 r437  
    5555    , m_haveSize(false) 
    5656    , m_sizeAvailable(false) 
     57    , m_hasUniformFrameSize(true) 
    5758    , m_decodedSize(0) 
    5859    , m_haveFrameCount(false) 
     
    126127        m_frames[index].m_duration = m_source.frameDurationAtIndex(index); 
    127128    m_frames[index].m_hasAlpha = m_source.frameHasAlphaAtIndex(index); 
    128      
    129     int sizeChange = m_frames[index].m_frame ? m_size.width() * m_size.height() * 4 : 0; 
     129 
     130    int sizeChange; 
     131    if (index) { 
     132        IntSize frameSize = m_source.frameSizeAtIndex(index); 
     133        if (frameSize != m_size) 
     134            m_hasUniformFrameSize = false; 
     135        sizeChange = m_frames[index].m_frame ? frameSize.width() * frameSize.height() * 4 : 0; 
     136    } else 
     137        sizeChange = m_frames[index].m_frame ? m_size.width() * m_size.height() * 4 : 0; 
     138 
    130139    if (sizeChange) { 
    131140        m_decodedSize += sizeChange; 
     
    144153} 
    145154 
     155IntSize BitmapImage::currentFrameSize() const 
     156{ 
     157    if (!m_currentFrame || m_hasUniformFrameSize) 
     158        return size(); 
     159    return m_source.frameSizeAtIndex(m_currentFrame); 
     160} 
     161 
    146162bool BitmapImage::dataChanged(bool allDataReceived) 
    147163{ 
     
    154170    // Clear the frame count. 
    155171    m_haveFrameCount = false; 
     172 
     173    m_hasUniformFrameSize = true; 
    156174 
    157175    // Image properties will not be available until the first frame of the file