Summary: | GIF animations should be suspended when outside of viewport | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, hnandor, japhet, kondapallykalyan, simon.fraser | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Antti Koivisto
2014-02-11 16:13:33 PST
Created attachment 223923 [details]
patch
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.
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. 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? (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. 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/). *** Bug 112327 has been marked as a duplicate of this bug. *** |