[Web Animations] Implement the cancel() method on Animation
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Dec 2017 22:12:37 +0000 (22:12 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Dec 2017 22:12:37 +0000 (22:12 +0000)
commit5f797ec93892fb0c6c7458c761a1ad8562217925
tree390fe1cd3da1451ab2d0bbeaf683ee26658d9f5b
parent31fdec730f8d79ad8c03d7ab0e55dafc2c7982df
[Web Animations] Implement the cancel() method on Animation
https://bugs.webkit.org/show_bug.cgi?id=180830
<rdar://problem/36055816>

Reviewed by Dean Jackson.

Source/WebCore:

We implement the cancel() method on the Animation interface with full spec text defining
the normative behavior of those methods and code matching those steps. Implementing the
cancel() method required implementing the notion of "resetting pending tasks",
which the Web Animations spec defines as well.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::setEffect):
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):
* animation/WebAnimation.h:
* animation/WebAnimation.idl:

LayoutTests:

Rebase some WPT expectations with progressions due to exposing the cancel() method.

* http/wpt/web-animations/interfaces/Animation/idlharness-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/wpt/web-animations/interfaces/Animation/idlharness-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h
Source/WebCore/animation/WebAnimation.idl