Bug 5340

Summary: Animated GIFs are unreliable when there are multiple Animated GIFs on the same page
Product: WebKit Reporter: Nic Rodgers <nic.rodgers>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ian
Priority: P3 Keywords: HasReduction
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.enableinteractive.co.uk/nic/safarianimatedgifbug/safarianimatedgifbugtestcase.html
Bug Depends on: 7318    
Bug Blocks:    
Attachments:
Description Flags
Testcase none

Description Nic Rodgers 2005-10-11 11:08:12 PDT
When more than one animated GIF features on a page Safari does not play the animation.

Additionally, the placement of code seems to effect the behaviour.

If the page scrolls, which animated GIF plays depends on the scroll position within the page! (they stop 
and start as you scroll)

Using different filenames (rather than multiple instances of the same file) doesn't appear to make any 
difference either.

A test case page is at http://www.enableinteractive.co.uk/nic/safarianimatedgifbug/
safarianimatedgifbugtestcase.html

I first noticed this in Safari on Panther, although the problem still remains in v2.0.1 on Tiger.
Comment 1 Ian 2005-12-26 21:35:46 PST
I have noticed a similar, likely related problem, but in my experience, it seems to align with cases when 
the URL of the image is contained within single quotes.

For example, on my LiveJournal friends page, my icon animates, and is coded as such:
<img src="http://www.livejournal.com/userpic/39223721/1898253" width="100" style="color: #ff0000; 
background: #000000; border: 2px solid #000000;" height="100" alt="" align="right" />

Whereas on an individual entry page, it is not animated, and coded as such:
<img src='http://www.livejournal.com/userpic/39223721/1898253' width='100' height='100' 
align='absmiddle' hspace='3' title='Kingsley (Ned) ZISSOU: Mr. Pibb + Red Vines' alt=''>
Comment 2 Joost de Valk (AlthA) 2005-12-26 22:32:42 PST
Though i don't know exactly where the issue is in, and if a gif is supposed to animate when it's in the 
background, this does seem weird and unwanted behavior. Camino does indeed animate all instances of 
the image. I'll confirm, and have added "HasReduction", i will download the testcase and add it to bugzilla. 
Submitter: please add the testcase to bugzilla yourself next time :).
Comment 3 Joost de Valk (AlthA) 2005-12-26 22:34:47 PST
Created attachment 5295 [details]
Testcase

Same as in URL, but saved for future reference.
Comment 4 Darin Adler 2006-02-19 19:26:35 PST
If I'm not mistaken, once the fix for bug 7318 is landed, we'll be able to see that this is now fixed in the tip of tree.

All the images seem to animate properly now -- I think Dave Hyatt fixed this recently when he revamped image loading and decoding.