[Web Animations] Animations do not naturally get a finish event
https://bugs.webkit.org/show_bug.cgi?id=184639
<rdar://problem/
39397649>
Reviewed by Jon Lee.
LayoutTests/imported/w3c:
Record two progressions in the Web Animations WPT tests.
* web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state-expected.txt:
Source/WebCore:
We must call updateFinishedState() when an animation gets sampled as it means its timeline's time has progressed
and it may have crossed to a finished state. Calling updateFinishedState() when sampling means that we'll correctly
set the animation's hold time to its end value, which means that currentTime() will now always be clamped to return
the end time once its has reached it, so we must not schedule animations to resolve immediately anymore since otherwise
they will keep being scheduled in a loop.
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::timeToNextRequiredTick const):
(WebCore::WebAnimation::resolve):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230665
268f45cc-cd09-0410-ab3c-
d52691b4dbfc