зеркало из https://github.com/mozilla/pjs.git
Bug 601723 - Fix gifs not animating on page reload. r=joe a=blocking-final
This commit is contained in:
Родитель
98d4fd6f32
Коммит
2ac8df0047
|
@ -166,12 +166,14 @@ nsresult imgRequestProxy::ChangeOwner(imgRequest *aNewOwner)
|
||||||
for (PRUint32 i = 0; i < oldLockCount; i++)
|
for (PRUint32 i = 0; i < oldLockCount; i++)
|
||||||
LockImage();
|
LockImage();
|
||||||
|
|
||||||
// If we had animation requests, apply them here
|
if (mCanceled) {
|
||||||
for (PRUint32 i = 0; i < oldAnimationConsumers; i++)
|
// If we had animation requests, restore them before exiting
|
||||||
IncrementAnimationConsumers();
|
// (otherwise we restore them later below)
|
||||||
|
for (PRUint32 i = 0; i < oldAnimationConsumers; i++)
|
||||||
|
IncrementAnimationConsumers();
|
||||||
|
|
||||||
if (mCanceled)
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
// Were we decoded before?
|
// Were we decoded before?
|
||||||
PRBool wasDecoded = PR_FALSE;
|
PRBool wasDecoded = PR_FALSE;
|
||||||
|
@ -185,6 +187,12 @@ nsresult imgRequestProxy::ChangeOwner(imgRequest *aNewOwner)
|
||||||
// OnStopRequest, if needed.
|
// OnStopRequest, if needed.
|
||||||
mOwner->RemoveProxy(this, NS_IMAGELIB_CHANGING_OWNER, PR_FALSE);
|
mOwner->RemoveProxy(this, NS_IMAGELIB_CHANGING_OWNER, PR_FALSE);
|
||||||
|
|
||||||
|
// If we had animation requests, restore them here. Note that we
|
||||||
|
// do this *after* RemoveProxy, which clears out animation consumers
|
||||||
|
// (see bug 601723).
|
||||||
|
for (PRUint32 i = 0; i < oldAnimationConsumers; i++)
|
||||||
|
IncrementAnimationConsumers();
|
||||||
|
|
||||||
mOwner = aNewOwner;
|
mOwner = aNewOwner;
|
||||||
|
|
||||||
mOwner->AddProxy(this);
|
mOwner->AddProxy(this);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче