Changeset 102519 in webkit
- Timestamp:
- Dec 10, 2011 1:54:37 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102517 r102519 1 2011-12-10 Noel Gordon <noel.gordon@gmail.com> 2 3 WebPImageDecoder progressive decodes fail to decode valid images 4 https://bugs.webkit.org/show_bug.cgi?id=74062 5 6 Reviewed by Adam Barth. 7 8 The WEBP header is followed by a so-called P0 header, then some data to 9 decode. If a partial P0 header is received during progressive decodes, 10 WebPIDecGetRGB() returns false; that makes the decoder enter the failed 11 state, no image appears on the page. 12 13 James Zern (webp) recommended the following via e-mail: 14 15 WebPIUpdate() validates input data, and will return an error status for 16 malformed data (bit-stream error, invalid data). Otherwise, it returns 17 OK or SUSPENDED. OK means that decoding is done/complete/no-error, and 18 SUSPENDED means more input data is needed to complete decoding. A NULL 19 return from WebPIDecGetRGB() is valid at this time due to a partial P0, 20 and should not be interpreted as a decoding failure. 21 22 No new tests. Not something DumpRenderTree can easily test. 23 24 * platform/image-decoders/webp/WEBPImageDecoder.cpp: 25 (WebCore::WEBPImageDecoder::decode): A NULL WebPIDecGetRGB() return is 26 acceptable here. Return false instead of failing the decoder. 27 1 28 2011-12-09 Benjamin Poulain <bpoulain@apple.com> 2 29 -
trunk/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
r102310 r102519 135 135 return setFailed(); 136 136 if (!WebPIDecGetRGB(m_decoder, &newLastVisibleRow, 0, 0, 0)) 137 return setFailed();137 return false; 138 138 ASSERT(newLastVisibleRow >= 0); 139 139 ASSERT(newLastVisibleRow <= height);
Note: See TracChangeset
for help on using the changeset viewer.