Animated image prefs don't apply to background images

bug 94938 r=pavlov sr=tor a=asa patch=nivedita@netscape.com


git-svn-id: svn://10.0.0.236/trunk@116636 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
badami%netscape.com
2002-03-15 08:29:08 +00:00
parent 77105b9e58
commit a8b2d64408
2 changed files with 28 additions and 0 deletions

View File

@@ -35,6 +35,8 @@
#include "nsIContent.h"
#include "nsIDocument.h"
#include "imgIContainer.h"
#include "nsIHTMLContent.h"
#include "nsIViewManager.h"
@@ -130,6 +132,18 @@ NS_IMETHODIMP nsImageLoader::OnStartDecode(imgIRequest *aRequest, nsISupports *a
NS_IMETHODIMP nsImageLoader::OnStartContainer(imgIRequest *aRequest, nsISupports *aContext, imgIContainer *aImage)
{
if (aImage)
{
/* Get requested animation policy from the pres context:
* normal = 0
* one frame = 1
* one loop = 2
*/
PRUint16 animateMode = imgIContainer::kNormalAnimMode; //default value
nsresult rv = mPresContext->GetImageAnimationMode(&animateMode);
if (NS_SUCCEEDED(rv))
aImage->SetAnimationMode(animateMode);
}
return NS_OK;
}