Bug 1317837. RasterImage::RequestDecodeForSize should set mWantFullDecode just like StartDecoding if we don't have our size yet. r=aosmond
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 01 Dec 2016 15:52:06 -0600
changeset 325075 f03cdaa7c326306660a6952833ad3a8be6f26992
parent 325074 2d8e3c16f55b492e77cd0d9147d235141d3f4287
child 325076 23fddf70a2575d89a7eac19bd3c76c5737be8614
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersaosmond
bugs1317837
milestone53.0a1
Bug 1317837. RasterImage::RequestDecodeForSize should set mWantFullDecode just like StartDecoding if we don't have our size yet. r=aosmond
image/RasterImage.cpp
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -1054,16 +1054,17 @@ RasterImage::RequestDecodeForSize(const 
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (mError) {
     return NS_ERROR_FAILURE;
   }
 
   if (!mHasSize) {
+    mWantFullDecode = true;
     return NS_OK;
   }
 
   // Decide whether to sync decode images we can decode quickly. Here we are
   // explicitly trading off flashing for responsiveness in the case that we're
   // redecoding an image (see bug 845147).
   bool shouldSyncDecodeIfFast =
     !mHasBeenDecoded && (aFlags & FLAG_SYNC_DECODE_IF_FAST);