[Web Animations] Add animations to the timeline
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Oct 2017 21:31:24 +0000 (21:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Oct 2017 21:31:24 +0000 (21:31 +0000)
commit0baeff68329c84d6315ba9a7ccb1f3352d5ca2f6
treec71e4989f9e713a9d5e35574859ca589803e6c63
parent5e2a53d8233a3850dc6ca164c35df70d029d0e59
[Web Animations] Add animations to the timeline
https://bugs.webkit.org/show_bug.cgi?id=178643

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

Source/WebCore:

If a timeline is provided as a parameter to the Animation constructor,
add it to the timeline, and remove it when the object is destroyed.

We also start the basic mechanism to dump the contents of a timeline
as text for testing purposes, currently only logging the number of
animations in a timeline and just logging the class name for animation
themselves.

Test: webanimations/animation-creation-addition.html

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::description):
* animation/AnimationTimeline.h:
* animation/AnimationTimeline.idl:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::create):
(WebCore::WebAnimation::~WebAnimation):
(WebCore::WebAnimation::description):
* animation/WebAnimation.h:
* testing/Internals.cpp:
(WebCore::Internals::timelineDescription):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add a new test that checks that animations created with a timeline
are added to the provided timeline.

* webanimations/animation-creation-addition-expected.txt: Added.
* webanimations/animation-creation-addition.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/webanimations/animation-creation-addition-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/animation-creation-addition.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/AnimationTimeline.h
Source/WebCore/animation/AnimationTimeline.idl
Source/WebCore/animation/WebAnimation.cpp
Source/WebCore/animation/WebAnimation.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl