mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
ff20a21e5e
commit
ea8c2c8456
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user