[Web Animations] Make WPT test at interfaces/Animation/finish.html pass reliably
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 18:43:57 +0000 (18:43 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 18:43:57 +0000 (18:43 +0000)
commitad29456c5333cb72a4767e9d7be3883b0fe50688
treef885b3b608a6cf73da2558a5e3b1c064321e4960
parentd72e016a224f3cae122a70a8445b67d965317300
[Web Animations] Make WPT test at interfaces/Animation/finish.html pass reliably
https://bugs.webkit.org/show_bug.cgi?id=186496
<rdar://problem/41000179>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a WPT progression.

* web-platform-tests/web-animations/interfaces/Animation/finish-expected.txt:

Source/WebCore:

We used to only resolve animations that had a target element, but animations need not have a target and their
current time should still advance so that their finished promise may resolve. We now maintain a list of animations
without targets and we iterate through them as well as animations with targets in DocumentTimeline::updateAnimations().

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::addAnimation):
(WebCore::AnimationTimeline::removeAnimation):
(WebCore::AnimationTimeline::animationWasAddedToElement):
(WebCore::AnimationTimeline::animationWasRemovedFromElement):
* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline:: const):
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::updateAnimations):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::resolve):
* animation/WebAnimation.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/finish-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/AnimationTimeline.h
Source/WebCore/animation/DocumentTimeline.cpp
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h