Bug 1103328 (Part 3) - Fire HAS_TRANSPARENCY in nsIconDecoder. r=tn
authorSeth Fowler <seth@mozilla.com>
Mon, 24 Nov 2014 23:42:43 -0800
changeset 241751 48a1c4550955f894e4e45edbdb687999aa5ef9d9
parent 241750 bec65d2426771c26658d7d2841d3b57d14b6e7bb
child 241752 d92d3a036dfd1124f1b474e3dd2cfd03b4799ddb
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1103328
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1103328 (Part 3) - Fire HAS_TRANSPARENCY in nsIconDecoder. r=tn
image/decoders/nsIconDecoder.cpp
image/src/ProgressTracker.cpp
--- a/image/decoders/nsIconDecoder.cpp
+++ b/image/decoders/nsIconDecoder.cpp
@@ -54,16 +54,19 @@ nsIconDecoder::WriteInternal(const char*
 
       case iconStateHaveHeight:
 
         // Grab the Height
         mHeight = (uint8_t)*aBuffer;
 
         // Post our size to the superclass
         PostSize(mWidth, mHeight);
+
+        PostHasTransparency();
+
         if (HasError()) {
           // Setting the size led to an error.
           mState = iconStateFinished;
           return;
         }
 
         // If We're doing a size decode, we're done
         if (IsSizeDecode()) {
--- a/image/src/ProgressTracker.cpp
+++ b/image/src/ProgressTracker.cpp
@@ -74,17 +74,16 @@ CheckProgressConsistency(Progress aProgr
                             FLAG_IS_MULTIPART |
                             FLAG_HAS_ERROR));
   }
   if (aProgress & FLAG_IS_ANIMATED) {
     MOZ_ASSERT(aProgress & FLAG_DECODE_STARTED);
     MOZ_ASSERT(aProgress & FLAG_SIZE_AVAILABLE);
   }
   if (aProgress & FLAG_HAS_TRANSPARENCY) {
-    MOZ_ASSERT(aProgress & FLAG_DECODE_STARTED);
     MOZ_ASSERT(aProgress & FLAG_SIZE_AVAILABLE);
   }
   if (aProgress & FLAG_IS_MULTIPART) {
     // No preconditions.
   }
   if (aProgress & FLAG_LAST_PART_COMPLETE) {
     MOZ_ASSERT(aProgress & FLAG_LOAD_COMPLETE);
   }