New issue
Advanced search Search tips

Issue 906675 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 6
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cc::KeyframeModel::InEffect should take "fill: forwards" into account

Project Member Reported by yigu@chromium.org, Nov 19

Issue description

By spec [1], an animation effect is "in effect" if its active time is not unresolved. However, if the effect is in the "after phase" and its fill mode is neither "forwards" nor "both", its active time should be unresolved which makes the effect not "in effect". Our cc logic doesn't handle this case correctly.

This bug was not exposed because for regular animations we cancel the animation on compositor in such scenario. But for worklet animations that's not the case.

[1] https://drafts.csswg.org/web-animations/#in-effect
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 6

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

commit f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac
Author: Yi Gu <yigu@chromium.org>
Date: Thu Dec 06 16:01:23 2018

[cc] Fix incorrect KeyframeModel::InEffect() calculation on the cc side

By spec [1], an animation effect is "in effect" if its active time is
not unresolved. However, if the effect is in the "after phase" and its
fill mode is neither "forwards" nor "both", its active time should be
unresolved which makes the effect not "in effect". Our cc logic doesn't
handle this case correctly.

This bug was not exposed because for regular animations we cancel the
animation on compositor in such scenario. But for worklet animations
that's not the case.

This patch adds the logic of calculating phases and the corresponding
active time based on the spec [2].

[1] https://drafts.csswg.org/web-animations/#in-effect
[2] https://drafts.csswg.org/web-animations/#active-time

Bug:  906675 
Change-Id: I8872719432ede1eeeb1e7bdcf3b5f0312787c0d7
Reviewed-on: https://chromium-review.googlesource.com/c/1342598
Commit-Queue: Yi Gu <yigu@chromium.org>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614366}
[modify] https://crrev.com/f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac/cc/animation/keyframe_model.cc
[modify] https://crrev.com/f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac/cc/animation/keyframe_model.h
[modify] https://crrev.com/f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac/cc/animation/keyframe_model_unittest.cc
[modify] https://crrev.com/f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac/third_party/blink/web_tests/TestExpectations
[modify] https://crrev.com/f22e0fbd1e6b06ff4d59faf95b2338f750fc0dac/third_party/blink/web_tests/animations/animationworklet/worklet-animation-local-time-after-duration.html

Components: Internals>Compositing>Animation
Status: Fixed (was: Assigned)

Sign in to add a comment