Changeset 70758 in webkit


Ignore:
Timestamp:
Oct 28, 2010 1:21:48 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-28 Pascal Massimino <pascal.massimino@gmail.com>

Reviewed by Adam Barth.

fix setSize() call flow: it was only called the first
time (when onlySize is true)
Bug URL: https://bugs.webkit.org/show_bug.cgi?id=48494

Testing: difficult to exercise the bug, as it requires
some manual flow (change tab, scroll,...)

  • platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode):

fix: call setSize() even when onlySize is false

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70757 r70758  
     12010-10-28  Pascal Massimino  <pascal.massimino@gmail.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        fix setSize() call flow: it was only called the first
     6        time (when onlySize is true)
     7        Bug URL: https://bugs.webkit.org/show_bug.cgi?id=48494
     8
     9        Testing: difficult to exercise the bug, as it requires
     10        some manual flow (change tab, scroll,...)
     11
     12        * platform/image-decoders/webp/WEBPImageDecoder.cpp:
     13        (WebCore::WEBPImageDecoder::decode):
     14           fix: call setSize() even when onlySize is false
     15
    1162010-10-28  Andy Estes  <aestes@apple.com>
    217
  • trunk/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp

    r70392 r70758  
    8787    if (!WebPGetInfo(dataBytes, dataSize, &width, &height))
    8888        return setFailed();
     89    if (!ImageDecoder::isSizeAvailable() && !setSize(width, height))
     90        return setFailed();
    8991    if (onlySize)
    90         return setSize(width, height) || setFailed();
     92        return true;
    9193
    9294    // FIXME: Add support for progressive decoding.
    9395    if (!isAllDataReceived())
    9496        return true;
    95     if (m_frameBufferCache.isEmpty())
    96         return true;
     97    ASSERT(!m_frameBufferCache.isEmpty());
    9798    RGBA32Buffer& buffer = m_frameBufferCache[0];
    9899    if (buffer.status() == RGBA32Buffer::FrameEmpty) {
Note: See TracChangeset for help on using the changeset viewer.