Chromium Code Reviews
DescriptionWeb Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc
When sampling the animations and transitions timelines, we set the
AnimationClock's time and freeze it so that subsequent accesses of the clock's
time during style recalc receive the same value. The clock is unfrozen when
style recalc completes.
However, if a timeline is sampled after its last Player is removed, it will not
trigger style recalc *. This can occur if a transition is cancelled
prematurely. In this case, we will fail to unfreeze the clock, so transitions
started subsequently will see a stale clock time.
This change modifies DocumentTimeline::serviceAnimations() to unfreeze the
AnimationClock if it did not trigger a style recalc. It also adds a test to
verify this behavior.
* In non-CSS uses of the Web Animations model, a timeline can also fail to
trigger style recalc if its animations have no effect or no target.
BUG=303430, 248938
R=timloh@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161134
Patch Set 1 #Patch Set 2 : Fix unit test #Patch Set 3 : Really fix unit tests #
Total comments: 4
Patch Set 4 : Handle both timelines #Patch Set 5 : Fix test #Patch Set 6 : Rebased and updated unit test #Patch Set 7 : Reinstate assert #
Total comments: 1
Messages
Total messages: 6 (0 generated)
|