Bug 513749 - Mismerge causes issues in animated images. r=bholley a=beltzner
authorJoe Drew <joe@drew.ca>
Mon, 08 Mar 2010 14:42:00 -0500
changeset 33682 0a4e39d6cb7e3f813b44c36658fcb53c0bae2048
parent 33681 ff17dfa4e395e128f66ccaab921d1f6468f11110
child 33683 ad92ebff4d0c65b0516c5ddacd30a4ad43ac1b89
push id1128
push userjdrew@mozilla.com
push dateMon, 08 Mar 2010 19:44:36 +0000
reviewersbholley, beltzner
bugs513749
milestone1.9.2.2pre
Bug 513749 - Mismerge causes issues in animated images. r=bholley a=beltzner
modules/libpr0n/src/imgContainer.cpp
--- a/modules/libpr0n/src/imgContainer.cpp
+++ b/modules/libpr0n/src/imgContainer.cpp
@@ -1222,29 +1222,30 @@ nsresult imgContainer::DoComposite(imgFr
       default:
         // Copy previous frame into compositingFrame before we put the new frame on top
         // Assumes that the previous frame represents a full frame (it could be
         // smaller in size than the container, as long as the frame before it erased
         // itself)
         // Note: Frame 1 never gets into DoComposite(), so (aNextFrameIndex - 1) will
         // always be a valid frame number.
         if (mAnim->lastCompositedFrameIndex != aNextFrameIndex - 1) {
-          if (isFullPrevFrame && !aPrevFrame->GetIsPaletted())
+          if (isFullPrevFrame && !aPrevFrame->GetIsPaletted()) {
             // Just copy the bits
             CopyFrameImage(aPrevFrame, mAnim->compositingFrame);
           } else {
             if (needToBlankComposite) {
               // Only blank composite when prev is transparent or not full.
               if (aPrevFrame->GetHasAlpha() || !isFullPrevFrame) {
                 ClearFrame(mAnim->compositingFrame);
               }
             }
             DrawFrameTo(aPrevFrame, mAnim->compositingFrame, prevFrameRect);
           }
         }
+    }
   } else if (needToBlankComposite) {
     // If we just created the composite, it could have anything in it's
     // buffers. Clear them
     ClearFrame(mAnim->compositingFrame);
   }
 
   // Check if the frame we are composing wants the previous image restored afer
   // it is done. Don't store it (again) if last frame wanted its image restored