nice to see this one made it through to 1.4 final, very annoying, and potentially embarassing if NS7.1 has the same issue.
Actually, I am not at all convinced we even want to "fix" this.... (not to mention that I fail to see where the "potentially embarrasing" part comes in). In builds up through 1.3, if you had an image in two places on a page, they would animate in sync with each other, but preloaded images were not considered in this count. Now they are, for various correctness reasons.... At the same time, see bug 83774 comment 49 -- if we decide we want to address that issue, it may "fix" this "bug" automatically.
I've read some comment of bug 83774 and now I understand that this behavior is a design decision: looks like that same images are reperesented by same objects, so if there are animated images, restarting from the first frame would restart animation also all other images that have same source (just saing what I've undersood). This is an issue for me because I would like to use animated GIFs as it hotspot, instead of using Flash movies. Maybe the animation could be restarted when the "observers count" reach zero (I'm using some term coming from bug 83774 comments). In this case, if the image is completely hided form the page, because it's not used by any IMG tag, the animation would restart from first frame when it became again visible (changing the SRC attribute of an IMG object)
> Maybe the animation could be restarted when the "observers count" reach zero Right. That's what used to happen. With the changes in bug 83774, that count is never zero (that's what bug 83774 comment 49 is about), since the Image() object doing the precaching counts as an "observer".
If someone knows a workaround for this bug we can close it setting as wontfix... Otherwise, there is an hope that it would be fixed?
*** Bug 220992 has been marked as a duplicate of this bug. ***
14 years ago
*** Bug 226440 has been marked as a duplicate of this bug. ***
Comment on attachment 137095 [details] [diff] [review] Proposed patch pav, jst, would you review? The patch has two main parts: 1) Move starting of animations out of where it happened in imagelib and into consumers. This prevents animations from even starting till someone cares about them. 2) Since animations no longer get stopped once no frame shows them, adds code to nsHTMLImageElement::SetSrc to reset the animation.
Taking. This fixes bug 223868 and all the duplicates of this bug too. Incidentally it fixes the fact that the image animation prefs did not apply to list bullets.
Comment on attachment 137095 [details] [diff] [review] Proposed patch sr=jst
tor, is this something you could review, given that pav was ok with the general idea? I'm having no luck getting hold of him....
Created attachment 138637 [details] [diff] [review] Merged to tip
Checked in for 1.7a.