199045 r+sr=bz a=asa Animated image rotates although "Animate images should loop ... [X] never" is marked

This commit is contained in:
cbiesinger%web.de 2003-05-04 18:06:10 +00:00
Родитель 7188c5885b
Коммит b825755f7f
2 изменённых файлов: 22 добавлений и 0 удалений

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

@ -329,6 +329,17 @@ nsImageFrame::Init(nsIPresContext* aPresContext,
rv = HandleLoadError(loadBlocked ? NS_ERROR_IMAGE_BLOCKED : NS_ERROR_FAILURE,
presShell);
}
// If we already have an image container, OnStartContainer won't be called
// Set the animation mode here
nsCOMPtr<imgIContainer> image;
if (currentRequest)
currentRequest->GetImage(getter_AddRefs(image));
if (image) {
PRUint16 animateMode = imgIContainer::kNormalAnimMode; //default value
nsresult rv = mPresContext->GetImageAnimationMode(&animateMode);
if (NS_SUCCEEDED(rv))
image->SetAnimationMode(animateMode);
}
return rv;
}

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

@ -329,6 +329,17 @@ nsImageFrame::Init(nsIPresContext* aPresContext,
rv = HandleLoadError(loadBlocked ? NS_ERROR_IMAGE_BLOCKED : NS_ERROR_FAILURE,
presShell);
}
// If we already have an image container, OnStartContainer won't be called
// Set the animation mode here
nsCOMPtr<imgIContainer> image;
if (currentRequest)
currentRequest->GetImage(getter_AddRefs(image));
if (image) {
PRUint16 animateMode = imgIContainer::kNormalAnimMode; //default value
nsresult rv = mPresContext->GetImageAnimationMode(&animateMode);
if (NS_SUCCEEDED(rv))
image->SetAnimationMode(animateMode);
}
return rv;
}