WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
167901
Animated GIFs fail to play in multi-column layout
https://bugs.webkit.org/show_bug.cgi?id=167901
Summary
Animated GIFs fail to play in multi-column layout
Anton Eprev
Reported
2017-02-06 13:04:29 PST
When multiple animated GIFs are placed in multi-column container, Safari (10 and TP) will manage to play only a few of them. More GIFs you put in, higher chance they fail to play. This is happening only when the value of `columns` property is greater than 1. How to reproduce: 1) Open
https://jsfiddle.net/sdxaxuv5/
2) Usually last two images (in 3rd column) fail to start playing. 3) Change `columns` property's value from 3 to 1, and the issue will disappear. Checked on both iMac and iOS. Other browsers play all the images.
Attachments
Patch
(2.52 KB, patch)
2017-03-07 08:45 PST
,
Dave Hyatt
zalan
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-02-06 13:13:47 PST
<
rdar://problem/30382262
>
Said Abou-Hallawa
Comment 2
2017-02-06 16:23:05 PST
This is not an image drawing or animation issue. It is a rendering issue. I think it is related to column layout. In the test case
https://jsfiddle.net/sdxaxuv5/
, RenderElement::newImageAnimationFrameAvailable(), which is called via BitmapImage::advanceAnimation(, succeeds to call RenderObject::imageChanged() for the first four <img> elements in the column <div> element. But it fails to call it for the last two <img> elements. This happens because shouldRepaintForImageAnimation() returns true for the first four images but it returns false for the last two images. Because the image rect is not marked for painting, the last two images do not animate. Fixing the repaint issue should force the image to draw the next image frame.
Dave Hyatt
Comment 3
2017-03-07 08:45:45 PST
Created
attachment 303659
[details]
Patch
alan
Comment 4
2017-03-07 08:52:25 PST
Comment on
attachment 303659
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303659&action=review
Has this ever worked?
> Source/WebCore/rendering/RenderBox.cpp:2301 > + if (is<RenderMultiColumnFlowThread>(this)) {
is<RenderMultiColumnFlowThread>(*this)
> Source/WebCore/rendering/RenderBox.cpp:2309 > + if (RenderRegion* region = downcast<RenderMultiColumnFlowThread>(this)->physicalTranslationFromFlowToRegion((physicalPoint))) {
if (auto* region = downcast<RenderMultiColumnFlowThread>(*this).physicalTranslationFromFlowToRegion((physicalPoint)))
Dave Hyatt
Comment 5
2017-03-07 09:59:51 PST
Fixed in
r213523
.
Simon Fraser (smfr)
Comment 6
2017-03-07 10:55:31 PST
Comment on
attachment 303659
[details]
Patch Seems like this could be tested via tracking repaint rects.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug