WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170155
Animated SVG images are not paused when outside viewport
https://bugs.webkit.org/show_bug.cgi?id=170155
Summary
Animated SVG images are not paused when outside viewport
Chris Dumez
Reported
2017-03-27 18:33:59 PDT
Animated SVG images are not paused when outside viewport.
Attachments
WIP Patch
(22.00 KB, patch)
2017-03-27 19:56 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(22.04 KB, patch)
2017-03-27 20:09 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-elcapitan
(1.06 MB, application/zip)
2017-03-28 01:59 PDT
,
Build Bot
no flags
Details
Patch
(29.70 KB, patch)
2017-03-28 12:09 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(30.51 KB, patch)
2017-03-28 14:08 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-03-27 18:34:53 PDT
<
rdar://problem/31288893
>
Chris Dumez
Comment 2
2017-03-27 19:56:26 PDT
Created
attachment 305545
[details]
WIP Patch
Chris Dumez
Comment 3
2017-03-27 20:09:18 PDT
Created
attachment 305547
[details]
WIP Patch
Build Bot
Comment 4
2017-03-28 01:59:18 PDT
Comment on
attachment 305547
[details]
WIP Patch
Attachment 305547
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3425668
New failing tests: svg/animations/animated-svg-image-outside-viewport-paused.html svg/animations/animated-svg-image-removed-from-document-paused.html
Build Bot
Comment 5
2017-03-28 01:59:21 PDT
Created
attachment 305574
[details]
Archive of layout-test-results from ews103 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Chris Dumez
Comment 6
2017-03-28 12:09:19 PDT
Created
attachment 305620
[details]
Patch
Antti Koivisto
Comment 7
2017-03-28 13:44:54 PDT
Comment on
attachment 305620
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305620&action=review
> Source/WebCore/loader/cache/CachedImage.cpp:121 > + if (m_image) > + m_image->startAnimation();
It might be clearer if this was renamed to something like startAnimationIfNeeded() as it doesn't actually always start it.
> Source/WebCore/loader/cache/CachedImage.cpp:526 > + bool shouldPauseAnimation = true; > + > CachedResourceClientWalker<CachedImageClient> clientWalker(m_clients); > - while (CachedImageClient* client = clientWalker.next()) > - client->newImageAnimationFrameAvailable(*this); > + while (CachedImageClient* client = clientWalker.next()) { > + bool canPause = false; > + client->newImageAnimationFrameAvailable(*this, canPause);
One bool would be enough (canPause could be moved outside the loop).
> Source/WebCore/rendering/RenderElement.cpp:1496 > +void RenderElement::newImageAnimationFrameAvailable(CachedImage& image, bool& canPause)
Another option would be to use an enum return value.
> Source/WebCore/rendering/RenderView.cpp:1402 > + return Vector<CachedImage*>();
Are these CachedImages somehow guaranteed to stay alive?
Chris Dumez
Comment 8
2017-03-28 14:08:11 PDT
Created
attachment 305639
[details]
Patch
Chris Dumez
Comment 9
2017-03-28 16:11:40 PDT
Comment on
attachment 305639
[details]
Patch Clearing flags on attachment: 305639 Committed
r214503
: <
http://trac.webkit.org/changeset/214503
>
Chris Dumez
Comment 10
2017-03-28 16:11:45 PDT
All reviewed patches have been landed. Closing bug.
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