[Web Animations] Expose the currentTime property on AnimationTimeline
Created attachment 325141 [details] Patch
Comment on attachment 325141 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325141&action=review > Source/WebCore/animation/AnimationTimeline.cpp:57 > + if (m_currentTime) Flip this logic around. Put the nullopt case in the if. > LayoutTests/webanimations/timeline-current-time.html:11 > +internals.setTimelineCurrentTime(document.timeline, 1); Should also test null and negative values.
(In reply to Dean Jackson from comment #2) > Comment on attachment 325141 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=325141&action=review > > > Source/WebCore/animation/AnimationTimeline.cpp:57 > > + if (m_currentTime) > > Flip this logic around. Put the nullopt case in the if. Will do. > > LayoutTests/webanimations/timeline-current-time.html:11 > > +internals.setTimelineCurrentTime(document.timeline, 1); > > Should also test null and negative values. We don't support null values as it stands, I'm not sure there's much sense in that since a timeline cannot go back to having a null currentTime once it's started having one. I'll add a test for a negative time.
Committed r224128: <https://trac.webkit.org/changeset/224128>
<rdar://problem/35271080>