[Web Animations] Expose the currentTime property on AnimationTimeline
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Oct 2017 20:29:59 +0000 (20:29 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Oct 2017 20:29:59 +0000 (20:29 +0000)
commite30a52cb0f05dfc69330410c354b18aaba7dfbda
treef430538f0ec01601ff7f8d9f2d075b2c9dc97434
parentea31f9281c4b7ae4b9a027749c6462aa0d16e947
[Web Animations] Expose the currentTime property on AnimationTimeline
https://bugs.webkit.org/show_bug.cgi?id=178928

Reviewed by Dean Jackson.

Source/WebCore:

We add the currentTime property on AnimationTimeline and add an internals method
to set it in a test which will allow us to validate the timing model state for
a given time.

Test: webanimations/timeline-current-time.html

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::bindingsCurrentTime const):
(WebCore::AnimationTimeline::setCurrentTime):
* animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::currentTime const):
* animation/AnimationTimeline.idl:
* testing/Internals.cpp:
(WebCore::Internals::setTimelineCurrentTime):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add a new test that checks we can read the document's timeline currentTime
property and set it via the internals method.

* webanimations/timeline-current-time-expected.txt: Added.
* webanimations/timeline-current-time.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webanimations/timeline-current-time-expected.txt [new file with mode: 0644]
LayoutTests/webanimations/timeline-current-time.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/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl