ImageDecoder::FrameIsCompleteAtIndex[1] is meant to return whether all encoded data for the frame at the queried index has been received. While it returns this value for animated images, for single frame images, it returns true only if a cached decode for the complete image is available. This discrepancy ends up having code in blink::BitmapImage incorrectly assuming that the image has only been partially loaded[2].
Note that this means that for lazily decoded single-frame images, [2] will never be true since the decoder that decodes and caches frames is different from the decoder in DeferredImageDecoder which is used only for parsing the metadata.
[1]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h?l=196
[2]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/BitmapImage.h?l=125
Comment 1 by bugdroid1@chromium.org
, May 16 2017