[Web Animations] Interrupting an accelerated CSS transition on a composited element...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2018 07:13:19 +0000 (07:13 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2018 07:13:19 +0000 (07:13 +0000)
commit8c107dfd1bacdca39904c53018e90f04a04bed91
tree6bc43c542a9b8360234a6e5d2c4ec02e0ea9861b
parent5ab92f8244d523f163301bf18146fa9fb4a691f8
[Web Animations] Interrupting an accelerated CSS transition on a composited element in flight fails
https://bugs.webkit.org/show_bug.cgi?id=189405
<rdar://problem/43342639>

Reviewed by Simon Fraser.

Source/WebCore:

Test: webanimations/accelerated-transition-interrupted-on-composited-element.html

If we interrupt an animation on an element that is composited also outside of the duration of the animation,
the "stop" accelerated action would fail to be performed because we no longer had a resolved current time and
the accelerated animation applied to the layer would never be removed.

However, having a resolved current time is not necessary to stop an animation, only for the other types of
actions (play, pause and seek). So we now simply default to a 0s time for an unresolved current time for a
simple fix to this issue.

* animation/KeyframeEffectReadOnly.cpp:
(WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions):

LayoutTests:

Add a new test that checks that interrupting a CSS transition targeting an accelerated property for an element
that is composited outside the duration of the transition correctly interrupts the animation and jumps straight
to the target value.

* platform/win/TestExpectations:
* webanimations/accelerated-transition-interrupted-on-composited-element-expected.html: Added.
* webanimations/accelerated-transition-interrupted-on-composited-element.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/win/TestExpectations
LayoutTests/webanimations/accelerated-transition-interrupted-on-composited-element-expected.html [new file with mode: 0644]
LayoutTests/webanimations/accelerated-transition-interrupted-on-composited-element.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/KeyframeEffectReadOnly.cpp