Bug 139672

Summary: REGRESSION (r163928): Animated GIFs are not resumed when translated into view using -webkit-transform
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: ImagesAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Major CC: barraclough, commit-queue, esprehn+autocc, kangil.han, kling, koivisto, simon.fraser
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: All   
Bug Depends on:    
Bug Blocks: 139701    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-12-15 23:08:47 PST
After r163928, animated GIFs are not resumed when translated into view using -webkit-transform CSS property.

This breaks animated gifs on the mobile version of weibo.com (which is one of the most popular blogging sites in China) on iPhone. e.g.
http://m.weibo.cn/page/tpl?containerid=1005052150182731_-_WEIBO_SECOND_PROFILE_WEIBO&itemid=&title=全部微博

Radar: <rdar://problem/19260797>
Comment 1 Chris Dumez 2014-12-15 23:13:20 PST
Reproduction case:
http://jsfiddle.net/k9qn8n5w/22/
Comment 2 Chris Dumez 2014-12-15 23:42:10 PST
Created attachment 243352 [details]
Patch
Comment 3 WebKit Commit Bot 2014-12-16 08:11:50 PST
Comment on attachment 243352 [details]
Patch

Clearing flags on attachment: 243352

Committed r177360: <http://trac.webkit.org/changeset/177360>
Comment 4 WebKit Commit Bot 2014-12-16 08:11:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Simon Fraser (smfr) 2014-12-16 09:23:24 PST
Comment on attachment 243352 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=243352&action=review

> Source/WebCore/dom/Document.cpp:1820
> +    frameView.resumeVisibleImageAnimationsIncludingSubframes();

Do you have a test for animated GIF in a subframe, and then moving the iframe's location using position or transform?
Comment 6 Chris Dumez 2014-12-16 09:28:43 PST
Comment on attachment 243352 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=243352&action=review

>> Source/WebCore/dom/Document.cpp:1820
>> +    frameView.resumeVisibleImageAnimationsIncludingSubframes();
> 
> Do you have a test for animated GIF in a subframe, and then moving the iframe's location using position or transform?

No, I don't think we have such test yet. I will add coverage for this case soon, I believe the current code should handle this fine though.
Comment 7 Chris Dumez 2014-12-16 13:48:54 PST
(In reply to comment #5)
> Comment on attachment 243352 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=243352&action=review
> 
> > Source/WebCore/dom/Document.cpp:1820
> > +    frameView.resumeVisibleImageAnimationsIncludingSubframes();
> 
> Do you have a test for animated GIF in a subframe, and then moving the
> iframe's location using position or transform?

https://bugs.webkit.org/show_bug.cgi?id=139701