Fix fragmented image signature handling
ImageDecoder::determineImageType() is currently only examining the first
buffer segment (getSomeData). But the signature is not guaranteed to be contiguous,
nor do we ever re-consolidate the buffer after receiving more data.
As a consequence, when the signature is fragmented (e.g. due to a slow
image load), we cannot detect the image type - even after all the data is
Refactor determineImageType() to consolidate the signature when needed.
(cherry picked from commit 1b80a74055acae8a0296afe644513f52e34dec79)
Review URL: https://codereview.chromium.org/2260703002 .
1 file changed