New issue
Advanced search Search tips

Issue 882925 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Background-image animated gifs not being frozen when should be by animation policy

Reported by t...@percy.io, Sep 11

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
1. Set the animation policy to disable animations (with Google's "Animation Policy" Chrome Extension)
2. Open the attached animated_problem.html file

What is the expected behavior?
All 4 gifs should be frozen

What went wrong?
Only gifs in image tags are frozen.  Gif's that are loaded via background-image styles are not frozen.  They should be too.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 68.0.3440.106  Channel: n/a
OS Version: OS X 10.12.6
Flash Version: 

If the same gif is used for all 4 images, then background-image gifs are frozen.
 
animated_problem.html
1.0 KB View Download
Components: Internals>Accessibility
Cc: vmp...@chromium.org
Cc: khushals...@chromium.org
Labels: Needs-Triage-M68
Components: -Internals>Accessibility Internals>Compositing>Images
I think this is an issue with image compositing - I see ImageAnimationPolicy referred to in bitmap_image.cc. Not sure why a background image would behave differently, but hopefully someone will know.
Thanks for all of the updates here.  Were you able to reproduce the problem?
Owner: khushals...@chromium.org
Status: Assigned (was: Unconfirmed)
I'll take a look at this. The image animation is controlled in cc which should be getting the ImageAnimationPolicy from blink.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe

commit d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe
Author: Khushal <khushalsagar@chromium.org>
Date: Tue Sep 18 22:15:08 2018

blink/images: Set image animation policy correctly for style images.

StyleImage was not updating the image animation policy correctly, which
was causing background-image images to animate even when disabled from
the browser.

R=chrishtr@chromium.org

Bug:  882925 
Change-Id: I54c6c5241f24925ddf67e86f2323b209bdf78b2b
Reviewed-on: https://chromium-review.googlesource.com/1227490
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592222}
[add] https://crrev.com/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe/third_party/WebKit/LayoutTests/accessibility/animation-policy-background-image-expected.png
[add] https://crrev.com/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe/third_party/WebKit/LayoutTests/accessibility/animation-policy-background-image-expected.txt
[add] https://crrev.com/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe/third_party/WebKit/LayoutTests/accessibility/animation-policy-background-image.html
[modify] https://crrev.com/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe/third_party/blink/renderer/core/style/style_fetched_image.cc
[modify] https://crrev.com/d4b3e2785d6b60708e7787c96cdd4649bf1c8bbe/third_party/blink/renderer/core/style/style_fetched_image.h

Status: Fixed (was: Assigned)
Thank you.  Can someone help me understand what version of Chrome this will be shipped in please?
This will be in the 71 stable release. I'll post an update when the next canary is out, so you can verify the fix on it.
The fix is in the 71.0.3556.0 canary release.
Thank you. I have observed the fix in Chrome 71 Canary.  I'm looking forward to getting Chrome 71 into our production infrastructure!

Tim

Sign in to add a comment