WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
139528
Image animation is not always stopped if used as background-image of a div that is outside viewport
https://bugs.webkit.org/show_bug.cgi?id=139528
Summary
Image animation is not always stopped if used as background-image of a div th...
Chris Dumez
Reported
2014-12-10 21:28:57 PST
Image animation is not always stopped if used as background-image of a div that is outside viewport. In particular, the animation is not stopped if the div has content overflowing *inside* the viewport (even though the animated gif is not visible, only the overflowing content is). This is because shouldRepaintForImageAnimation() relies on the renderer's overflow rect instead of its bounding box to determine if it is inside viewport.
Attachments
Patch
(5.98 KB, patch)
2014-12-10 21:36 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(5.98 KB, patch)
2014-12-10 22:01 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(6.02 KB, patch)
2014-12-10 22:06 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-12-10 21:36:59 PST
Created
attachment 243098
[details]
Patch
Chris Dumez
Comment 2
2014-12-10 22:01:31 PST
Created
attachment 243103
[details]
Patch
Chris Dumez
Comment 3
2014-12-10 22:06:53 PST
Created
attachment 243104
[details]
Patch
Chris Dumez
Comment 4
2014-12-10 23:46:25 PST
I regressed this in
http://trac.webkit.org/changeset/176212
when refactoring the code to detect if we're inside viewport to be shared between animated images and DOM Timer throttling.
Simon Fraser (smfr)
Comment 5
2014-12-11 10:20:53 PST
Comment on
attachment 243104
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=243104&action=review
> Source/WebCore/rendering/RenderElement.cpp:1371 > + LayoutRect backgroundPaintingRect = backgroundIsPaintedByRoot ? renderer.view().backgroundRect(&renderer.view()) : renderer.absoluteBoundingBoxRect();
But doesn't this regress the reflection case, and possibly others?
Chris Dumez
Comment 6
2014-12-11 10:23:39 PST
Comment on
attachment 243104
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=243104&action=review
>> Source/WebCore/rendering/RenderElement.cpp:1371 >> + LayoutRect backgroundPaintingRect = backgroundIsPaintedByRoot ? renderer.view().backgroundRect(&renderer.view()) : renderer.absoluteBoundingBoxRect(); > > But doesn't this regress the reflection case, and possibly others?
Hmm, I will have to check. It is indeed possible. If so, it is better to be conservative and use the overflow rect.
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