[Web Animations] Crash when setting "animation: none" after clearing an animation...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 19:30:36 +0000 (19:30 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 19:30:36 +0000 (19:30 +0000)
commitd733808104103e105c5c125aec1a26c3b0fb9c01
treebf4499b53bd086979be192199b627883a17c8d62
parent46e8d743c1ce1dfb1ab6e6402715cf50977d4743
[Web Animations] Crash when setting "animation: none" after clearing an animation's effect
https://bugs.webkit.org/show_bug.cgi?id=187952

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/setting-css-animation-none-after-clearing-effect.html

We need to ensure that the animation we're trying to remove has not had its effect cleared via the
Web Animations API since its creation before trying to check its phase.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation):

LayoutTests:

Add a new test that checks that setting "animation: none" on an element that previously had a valid
CSS animation and for which the effect was set to null does not crash.

* webanimations/setting-css-animation-none-after-clearing-effect-expected.txt: Added.
* webanimations/setting-css-animation-none-after-clearing-effect.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webanimations/setting-css-animation-none-after-clearing-effect-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/setting-css-animation-none-after-clearing-effect.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.cpp