[Web Animations] REGRESSION: setting 'animation-name: none' after a 'fill: forwards...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2018 20:54:17 +0000 (20:54 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2018 20:54:17 +0000 (20:54 +0000)
commitacf2f5ee565954234d28300dc7f4b8d2f8a2f363
tree0abe99fa6248a45a303234d5cd5fd81c5475250e
parent51662bdef89264e9057ba357498bafabd3b4ac0e
[Web Animations] REGRESSION: setting 'animation-name: none' after a 'fill: forwards' animation has completed does not revert to the unanimated style
https://bugs.webkit.org/show_bug.cgi?id=190257
<rdar://problem/41341473>

Reviewed by Dean Jackson.

Source/WebCore:

Test: animations/animation-fill-forwards-removal.html

While we removed a declarative animation that was no longer targetting its element, we were not removing it from the declarative animation maps
on the timeline, which means that the animation would still be picked up when resolving styles. We now notify the timeline that the animation
was detached from the element. This preserves the DeclarativeAnimation relationship returning the element as its effect's target and the document
timeline as its timeline, but the document timeline will no longer see this animation as targeting this element.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation):
* animation/DeclarativeAnimation.h:
(WebCore::DeclarativeAnimation::target const):

LayoutTests:

Add a test that checks that an animation with fill: forwards no longer applies to an element once it's been removed.

* animations/animation-fill-forwards-removal-expected.txt: Added.
* animations/animation-fill-forwards-removal.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/animations/animation-fill-forwards-removal-expected.txt [new file with mode: 0644]
LayoutTests/animations/animation-fill-forwards-removal.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/DeclarativeAnimation.h