This commit is contained in:
pavlov%netscape.com 2001-02-24 00:31:08 +00:00
Родитель 147e289d6f
Коммит 7ecc928aa6
1 изменённых файлов: 13 добавлений и 2 удалений

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

@ -100,7 +100,7 @@ nsresult imgRequest::AddObserver(imgIDecoderObserver *observer)
if (mObservers.Count() == 1) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 0) {
if (nframes > 1) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::AddObserver -- starting animation\n", this));
@ -121,7 +121,7 @@ nsresult imgRequest::RemoveObserver(imgIDecoderObserver *observer, nsresult stat
if (mImage) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 0) {
if (nframes > 1) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::RemoveObserver -- stopping animation\n", this));
@ -164,6 +164,17 @@ NS_IMETHODIMP imgRequest::Cancel(nsresult status)
ImageCache::Remove(mURI);
if (mImage) {
PRUint32 nframes;
mImage->GetNumFrames(&nframes);
if (nframes > 1) {
PR_LOG(gImgLog, PR_LOG_DEBUG,
("[this=%p] imgRequest::RemoveObserver -- stopping animation\n", this));
mImage->StopAnimation();
}
}
if (mChannel && mProcessing)
return mChannel->Cancel(status);