Backed out changeset cae99e27ccdd, restoring document.timeline and rAF timestamp comparisons
Depends on D43788
Differential Revision: https://phabricator.services.mozilla.com/D43789
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1577243
gecko-commit: 02bfa4baa2edd2d1c9417018c4cbd85e99d15aa8
gecko-integration-branch: autoland
gecko-reviewers: birtles
diff --git a/web-animations/timing-model/timelines/document-timelines.html b/web-animations/timing-model/timelines/document-timelines.html
index f45865a..4023bba 100644
--- a/web-animations/timing-model/timelines/document-timelines.html
+++ b/web-animations/timing-model/timelines/document-timelines.html
@@ -9,10 +9,6 @@
<script>
'use strict';
-function matchUnconditionalClamping(timestamp) {
- return parseFloat((Math.floor(timestamp / .02) * .02).toPrecision(8), 10);
-}
-
async_test(t => {
assert_greater_than_equal(document.timeline.currentTime, 0,
'The current time is initially is positive or zero');
@@ -32,7 +28,7 @@
// so we use requestAnimationFrame instead.
window.requestAnimationFrame(rafTime => {
t.step(() => {
- assert_equals(document.timeline.currentTime, matchUnconditionalClamping(rafTime),
+ assert_equals(document.timeline.currentTime, rafTime,
'The current time matches requestAnimationFrame time');
});
t.done();