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
128632
GIF animations should be suspended when outside of viewport
https://bugs.webkit.org/show_bug.cgi?id=128632
Summary
GIF animations should be suspended when outside of viewport
Antti Koivisto
Reported
2014-02-11 16:13:33 PST
Animations are driven by the paint cycle. Speculative tiles keep animations outside the actual viewport going.
Attachments
patch
(21.50 KB, patch)
2014-02-11 17:36 PST
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2014-02-11 16:13:52 PST
<
rdar://problem/15895090
>
Antti Koivisto
Comment 2
2014-02-11 17:36:41 PST
Created
attachment 223923
[details]
patch
WebKit Commit Bot
Comment 3
2014-02-11 17:38:55 PST
Attachment 223923
[details]
did not pass style-queue: ERROR: Source/WebCore/rendering/RenderView.cpp:1181: Extra space after ( in function call [whitespace/parens] [4] Total errors found: 1 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andreas Kling
Comment 4
2014-02-11 17:47:39 PST
Comment on
attachment 223923
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=223923&action=review
r=me
> Source/WebCore/page/Page.cpp:1149 > + if (frame->contentRenderer()) > + frame->contentRenderer()->resumePausedImageAnimationsIfNeeded();
I'd put the renderer in a local.
> Source/WebCore/rendering/RenderElement.cpp:1287 > + if (document.view()->isOffscreen()) > + return false;
renderer.frameView().isOffscreen()
> Source/WebCore/rendering/RenderElement.cpp:1290 > + if (document.frame()->timersPaused()) > + return false;
renderer.frame().timersPaused()
> Source/WebCore/rendering/RenderElement.cpp:1304 > + auto visibleRect = document().view()->visibleContentRect();
frameView().visibleContentRect()
> Source/WebCore/rendering/RenderElement.h:206 > + virtual void newImageAnimationFrameAvailable(CachedImage&) override;
This should be final, too!
> Source/WebCore/rendering/RenderView.cpp:1181 > +void RenderView::addRendererWithPausedImageAnimations( RenderElement& renderer)
Weird space here!
> Source/WebCore/rendering/RenderView.cpp:1203 > + Vector<RenderElement*> toRemove;
I'd give this some token inline capacity.
Antti Koivisto
Comment 5
2014-02-11 18:51:24 PST
http://trac.webkit.org/changeset/163928
Simon Fraser (smfr)
Comment 6
2014-02-11 19:04:50 PST
Comment on
attachment 223923
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=223923&action=review
> Source/WebCore/rendering/RenderElement.cpp:1296 > + if (!visibleRect.intersects(renderer.absoluteBoundingBoxRect()))
Sad that you have to call renderer.absoluteBoundingBoxRect() here; that walks up the tree!
> LayoutTests/ChangeLog:9 > + * fast/repaint/no-animation-outside-viewport.html: Added.
Doesn't this need to be a tiled drawing test?
Antti Koivisto
Comment 7
2014-02-11 19:57:23 PST
(In reply to
comment #6
)
> Sad that you have to call renderer.absoluteBoundingBoxRect() here; that walks up the tree!
Kinda unavoidable.
> Doesn't this need to be a tiled drawing test?
The test works as expected in wk2. I don't know what is tiled drawing test.
Simon Fraser (smfr)
Comment 8
2014-02-11 20:44:17 PST
I guess all WK2 tests are in tiled drawing mode now. That used to not be the case (which is why some tests live in LayoutTests/platform/mac-wk2/tiled-drawing/).
Said Abou-Hallawa
Comment 9
2017-08-24 15:54:57 PDT
***
Bug 112327
has been marked as a duplicate of this 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