| Summary: | Image is unexpectedly decoded | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yoshiaki Jitsukawa <yoshiaki.jitsukawa> |
| Component: | Images | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cgarcia, clopez, Hironori.Fujii, magomez, sabouhallawa, simon.fraser |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=170432 | ||
|
Description
Yoshiaki Jitsukawa
2018-07-12 00:03:34 PDT
I thought the "return m_decoder->size();" code would be taken:
IntSize ImageSource::size()
{
#if !USE(CG)
// It's possible that we have decoded the metadata, but not frame contents yet. In that case ImageDecoder claims to
// have the size available, but the frame cache is empty. Return the decoder size without caching in such case.
if (m_frames.isEmpty() && isDecoderAvailable())
return m_decoder->size();
#endif
return frameMetadataAtIndexCacheIfNeeded<IntSize>(0, (&ImageFrame::size), &m_size, ImageFrame::Caching::Metadata, SubsamplingLevel::Default);
}
but actually m_frames was not empty because dataChanged() added a frame by
growFrames() when EncodedDataStatus got to SizeAvailable
EncodedDataStatus ImageSource::dataChanged(SharedBuffer* data, bool allDataReceived)
{
setData(data, allDataReceived);
clearMetadata();
EncodedDataStatus status = encodedDataStatus();
if (status >= EncodedDataStatus::SizeAvailable)
growFrames();
return status;
}
*** This bug has been marked as a duplicate of bug 191354 *** |