Changeset 52102 in webkit


Ignore:
Timestamp:
Dec 14, 2009 10:45:10 AM (14 years ago)
Author:
agl@chromium.org
Message:

2009-12-14 Adam Langley <agl@google.com>

Reviewed by Darin Adler.

Test that an image's size is valid before reading it.

Previously, an image that failed to load (m_failed == true) would
trigger an assertion failure when WebKit tried to get its size.

https://bugs.webkit.org/show_bug.cgi?id=32176
http://code.google.com/p/chromium/issues/detail?id=28566

Test: fast/images/size-failure.html

  • platform/graphics/ImageSource.cpp: (WebCore::ImageSource::createFrameAtIndex):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52100 r52102  
     12009-12-14  Adam Langley  <agl@google.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Test that an image's size is valid before reading it.
     6
     7        Previously, an image that failed to load (m_failed == true) would
     8        trigger an assertion failure when WebKit tried to get its size.
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=32176
     11        http://code.google.com/p/chromium/issues/detail?id=28566
     12
     13        * fast/images/resources/size-failure.gif: Added.
     14        * fast/images/size-failure-expected.txt: Added.
     15        * fast/images/size-failure.html: Added.
     16
    1172009-12-14  Dan Bernstein  <mitz@apple.com>
    218
  • trunk/WebCore/ChangeLog

    r52100 r52102  
     12009-12-14  Adam Langley  <agl@google.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Test that an image's size is valid before reading it.
     6
     7        Previously, an image that failed to load (m_failed == true) would
     8        trigger an assertion failure when WebKit tried to get its size.
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=32176
     11        http://code.google.com/p/chromium/issues/detail?id=28566
     12
     13        Test: fast/images/size-failure.html
     14
     15        * platform/graphics/ImageSource.cpp:
     16        (WebCore::ImageSource::createFrameAtIndex):
     17
    1182009-12-14  Dan Bernstein  <mitz@apple.com>
    219
  • trunk/WebCore/platform/graphics/ImageSource.cpp

    r49185 r52102  
    132132    // Zero-height images can cause problems for some ports.  If we have an
    133133    // empty image dimension, just bail.
    134     if (size().isEmpty())
     134    if (!isSizeAvailable() || size().isEmpty())
    135135        return 0;
    136136
Note: See TracChangeset for help on using the changeset viewer.