 Chromium Code Reviews
 Chromium Code Reviews Issue 2879123003:
  blink: Fix frame completion querying for static images.  (Closed)
    
  
    Issue 2879123003:
  blink: Fix frame completion querying for static images.  (Closed) 
  | Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp | 
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp | 
| index e7eac4b4a3f696ab1f6871dafc99fab7d4d1b4e3..554a5bc785890d4b4e1ca5a732dccde65fd5fd95 100644 | 
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp | 
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp | 
| @@ -187,8 +187,14 @@ bool ImageDecoder::FrameHasAlphaAtIndex(size_t index) const { | 
| } | 
| bool ImageDecoder::FrameIsCompleteAtIndex(size_t index) const { | 
| - return (index < frame_buffer_cache_.size()) && | 
| - (frame_buffer_cache_[index].GetStatus() == ImageFrame::kFrameComplete); | 
| + // Animated images override this method to return the status based on the data | 
| + // received for the queried frame. | 
| + return IsAllDataReceived(); | 
| 
scroggo_chromium
2017/05/30 15:51:34
Yay! I like that this method now means the same th
 | 
| +} | 
| + | 
| +bool ImageDecoder::FrameIsDecodedAtIndex(size_t index) const { | 
| + return index < frame_buffer_cache_.size() && | 
| + frame_buffer_cache_[index].GetStatus() == ImageFrame::kFrameComplete; | 
| } | 
| size_t ImageDecoder::FrameBytesAtIndex(size_t index) const { |