[Web Animations] Support AnimationEffect parameter in Animation constructor and read...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2017 20:28:18 +0000 (20:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Oct 2017 20:28:18 +0000 (20:28 +0000)
commit766b070ffffed5e7bc2189c11552645944aa500e
tree637837ed23a70b523afd10d0355c4dd2a3fb326f
parenta823c2e11751b9f4380665681c61dead434aa879
[Web Animations] Support AnimationEffect parameter in Animation constructor and read-write timeline property
https://bugs.webkit.org/show_bug.cgi?id=179066

Patch by Antoine Quint <graouts@apple.com> on 2017-10-31
Reviewed by Dean Jackson.

Source/WebCore:

We update the Animation constructor signature and behavior to allow for an AnimationEffect as its first,
null by default, parameter and implement the spec behavior where an omitted AnimationTimeline parameter
should default to the document timeline. We also make the timeline property read-write.

Existing tests are rebaselined and amended for this new behavior.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::create):
(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::setEffect):
(WebCore::WebAnimation::setTimeline):
* animation/WebAnimation.h:
* animation/WebAnimation.idl:

LayoutTests:

Rebaseline and amend tests to show support for the AnimationEffect first parameter to the Animation
constructor and the default document timeline value for the AnimationTimeline second parameter.

* http/wpt/web-animations/interfaces/Animation/constructor-expected.txt:
* http/wpt/web-animations/interfaces/Animation/idlharness-expected.txt:
* http/wpt/web-animations/interfaces/Animation/startTime-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt:
* http/wpt/web-animations/timing-model/animations/current-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:
* http/wpt/wk-web-animations/timing-model/animation-creation-basic-expected.txt:
* http/wpt/wk-web-animations/timing-model/animation-creation-basic.html:
* http/wpt/wk-web-animations/timing-model/animation-current-time.html:
* http/wpt/wk-web-animations/timing-model/animation-playback-rate.html:
* webanimations/animation-creation-addition.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/http/wpt/web-animations/interfaces/Animation/constructor-expected.txt
LayoutTests/http/wpt/web-animations/interfaces/Animation/idlharness-expected.txt
LayoutTests/http/wpt/web-animations/interfaces/Animation/startTime-expected.txt
LayoutTests/http/wpt/web-animations/interfaces/KeyframeEffect/setTarget-expected.txt
LayoutTests/http/wpt/web-animations/timing-model/animations/current-time-expected.txt
LayoutTests/http/wpt/web-animations/timing-model/animations/reversing-an-animation-expected.txt
LayoutTests/http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt
LayoutTests/http/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt
LayoutTests/http/wpt/wk-web-animations/timing-model/animation-creation-basic-expected.txt
LayoutTests/http/wpt/wk-web-animations/timing-model/animation-creation-basic.html
LayoutTests/http/wpt/wk-web-animations/timing-model/animation-current-time.html
LayoutTests/http/wpt/wk-web-animations/timing-model/animation-playback-rate.html
LayoutTests/webanimations/animation-creation-addition.html
Source/WebCore/ChangeLog
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h
Source/WebCore/animation/WebAnimation.idl