Bug 1422995 - Use waitForNextFrame() instead of waitForFrame() to make sure the next requestAnimationFrame callback happen. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 05 Dec 2017 09:13:42 +0900
changeset 394979 793d2834b3e3c2d1411216740161f1735f5fa70d
parent 394978 afc17c7465c2371b7ba0f50c92ec065c099e9fd3
child 394980 87305b25064ef513e0890696849bf0b06c48a586
push id97987
push usernerli@mozilla.com
push dateTue, 05 Dec 2017 13:52:50 +0000
treeherdermozilla-inbound@8842dba7396b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1422995, 1193394, 1416966
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1422995 - Use waitForNextFrame() instead of waitForFrame() to make sure the next requestAnimationFrame callback happen. r=birtles With the conformant Promise handling (bug 1193394) and performing micro task checkpoint in Animation tick (bug 1416966), if we call waitForFrame() inside the callback for Animation.ready.then it will still be done in the same refresh driver's tick. MozReview-Commit-ID: GQJiDHHUlyD
dom/animation/test/css-animations/file_animations-dynamic-changes.html
--- a/dom/animation/test/css-animations/file_animations-dynamic-changes.html
+++ b/dom/animation/test/css-animations/file_animations-dynamic-changes.html
@@ -21,17 +21,17 @@ promise_test(function(t) {
   // Wait a moment so we can confirm the startTime doesn't change (and doesn't
   // simply reflect the current time).
   return originalAnimation.ready.then(function() {
     originalStartTime = originalAnimation.startTime;
     originalCurrentTime = originalAnimation.currentTime;
 
     // Wait a moment so we can confirm the startTime doesn't change (and
     // doesn't simply reflect the current time).
-    return waitForFrame();
+    return waitForNextFrame();
   }).then(function() {
     div.style.animationDuration = '200s';
     var animation = div.getAnimations()[0];
     assert_equals(animation, originalAnimation,
                   'The same Animation is returned after updating'
                   + ' animation duration');
     assert_equals(animation.startTime, originalStartTime,
                   'Animations returned by getAnimations preserve'