Bug 767779 - Stop eating animation frames for non-multipart. r=joe

This commit is contained in:
Adam Dane [:hobophobe] 2012-07-21 20:07:15 -05:00
Родитель 5d1b19eb53
Коммит 2ad9f5fd2f
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1451,10 +1451,16 @@ RasterImage::AddSourceData(const char *aBuffer, PRUint32 aCount)
// This call should come straight from necko - no reentrancy allowed
NS_ABORT_IF_FALSE(!mInDecoder, "Re-entrant call to AddSourceData!");
// Image is already decoded, we shouldn't be getting data, but it could
// be extra garbage data at the end of a file.
if (mDecoded) {
return NS_OK;
}
// Starting a new part's frames, let's clean up before we add any
// This needs to happen just before we start getting EnsureFrame() call(s),
// so that there's no gap for anything to miss us.
if (mBytesDecoded == 0) {
if (mMultipart && mBytesDecoded == 0) {
// Our previous state may have been animated, so let's clean up
if (mAnimating) {
StopAnimation();