Bug 505385 - Part 0: Remove the last vestiges of manual animation reset within imagelib. r=joe

This stuff should now all be taken care of by the AnimationConsumers infrastructure.
This commit is contained in:
Bobby Holley 2012-10-12 12:11:20 -04:00
parent ff20a21e5e
commit ea8c2c8456
2 changed files with 0 additions and 29 deletions

View File

@ -188,13 +188,6 @@ void imgRequest::AddProxy(imgRequestProxy *proxy)
mLoader->SetHasProxies(mURI);
}
// If we don't have any current observers, we should restart any animation.
if (mImage && !HaveProxyWithObserver(proxy) && proxy->HasObserver()) {
LOG_MSG(gImgLog, "imgRequest::AddProxy", "resetting animation");
mImage->ResetAnimation();
}
proxy->SetPrincipal(mPrincipal);
mObservers.AppendElementUnlessExists(proxy);
@ -342,24 +335,6 @@ void imgRequest::RemoveFromCache()
mCacheEntry = nullptr;
}
bool imgRequest::HaveProxyWithObserver(imgRequestProxy* aProxyToIgnore) const
{
nsTObserverArray<imgRequestProxy*>::ForwardIterator iter(mObservers);
imgRequestProxy* proxy;
while (iter.HasMore()) {
proxy = iter.GetNext();
if (proxy == aProxyToIgnore) {
continue;
}
if (proxy->HasObserver()) {
return true;
}
}
return false;
}
int32_t imgRequest::Priority() const
{
int32_t priority = nsISupportsPriority::PRIORITY_NORMAL;

View File

@ -148,10 +148,6 @@ private:
// Returns whether we've got a reference to the cache entry.
bool HasCacheEntry() const;
// Return true if at least one of our proxies, excluding
// aProxyToIgnore, has an observer. aProxyToIgnore may be null.
bool HaveProxyWithObserver(imgRequestProxy* aProxyToIgnore) const;
// Return the priority of the underlying network request, or return
// PRIORITY_NORMAL if it doesn't support nsISupportsPriority.
int32_t Priority() const;