Issue metadata
Sign in to add a comment
|
visibility:hidden applied to iframe or it's parent freezes transform animation inside of it
Reported by
host.c...@gmail.com,
May 17 2016
|
||||||||||||||||||||||
Issue descriptionChrome Version : 50.0.2661.102 OS Version: 10.0 URLs (if applicable) :http://hostile-d.github.io/css_visabiolity_behavior/ Other browsers tested: Add OK or FAIL after other browsers where you have tested this issue: Safari 5: Firefox 4.x: IE 7/8/9: What steps will reproduce the problem? 1. Create iframe on page and put animated div inside of it(animated only with transform property). 2. Set visibility:hidden then visibility:visible to iframe or its parent; What is the expected result? Animation must resume according to specification. What happens instead of that? Animation stops. But if hover animated div in Dev Tools its looks like animation is still working (you can see it in attached .gif). UserAgentString: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
,
May 25 2016
,
May 25 2016
Confirmed that commit 510e13d1579b8fb895673358ac1a6594fbcadfe3 is where the regression started. Unable to cleanly revert, this is affecting stable, please investigate.
,
May 25 2016
I'm looking at this. Commenting out lines 770 - 773 in PaintLayerCompositor, added in http://crrev.com/1616183002, fixes the provided test case.
,
May 25 2016
Note from ajuma@ on hypothesis: ...[possible that] animation framework needs to be told that the composited layer is going away, so it knows to either takeover the animation and/or try to add it back when the composited layer comes back. Element::detach calls restartAnimationOnCompositor to handle the case of layers going away because of display:none, maybe something similar is needed for visibility:hidden iframes.
,
May 25 2016
,
May 25 2016
A couple of notes from investigation: The elements are never detached when the iframe is hidden. A side effect of http://crrev.com/1616183002 is that the composited layer mapping associated with the hidden iframe is removed, whereas previously they stayed around even though they weren't visible. I also see PaintLayerCompositor::{attach,detach}AnimationTimeline. Prior to my change, after initial load, neither were called when the iframe was then hidden/shown. With my change, detachAnimationTimeline is still never called, but attachAnimationTimeline is now called when we re-allocate the CLM. In general I would have thought we'd want CLM existence to be paired with attach/detachAnimationTimeline calls. I need to learn more about how animation operates, but it may be that it's trying to paint to a graphics layer that no longer exists, or that we need to fix the pairing of the attach/detachAnimationTimeline calls, or something else.
,
May 25 2016
Test case (just saved off from original bug report) is attached, open visibility.html.
,
May 25 2016
Hacking a call to: toElement(layer->layoutObject()->node())->elementAnimations()->restartAnimationOnCompositor() when we allocate a new composited layer mapping such as here: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp&q=paintlayercompositor&sq=package:chromium&type=cs&l=484 fixes things, but often requires a mouse movement before animation begins painting again for some reason.
,
May 26 2016
Removing Blink>Animation label since the bug is in the code which uses animations. The animation team members are in CC list.
,
May 26 2016
Sent http://crrev.com/2010963003 for discussion.
,
Jun 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/851bbadbc2348dcf79851c9be1b766e4ce00a2ab commit 851bbadbc2348dcf79851c9be1b766e4ce00a2ab Author: wkorman <wkorman@chromium.org> Date: Wed Jun 01 00:57:38 2016 Restart any animations when we allocate a composited layer. As part of this, fix FrameView to note a compositing update is needed when it is shown/hidden since it could gain/lose its composited layer and, if shown/gained, then we want to immediately restart any animations. BUG= 612436 Review-Url: https://codereview.chromium.org/2010963003 Cr-Commit-Position: refs/heads/master@{#397003} [modify] https://crrev.com/851bbadbc2348dcf79851c9be1b766e4ce00a2ab/third_party/WebKit/Source/core/frame/FrameView.cpp [modify] https://crrev.com/851bbadbc2348dcf79851c9be1b766e4ce00a2ab/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
,
Jun 1 2016
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by rnimmagadda@chromium.org
, May 18 2016Components: Blink>Animation
Labels: -Type-Bug -Pri-3 M-51 OS-Linux OS-Mac Pri-2 Type-Bug-Regression
Owner: wkorman@chromium.org
Status: Assigned (was: Unconfirmed)