diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 5cb72fce030..cb2abb781fa 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1491,19 +1491,15 @@ impl IOCompositor { }; if wait_for_stable_image { - match self.is_ready_to_paint_image_output() { - Ok(()) => { - // The current image is ready to output. However, if there are animations active, - // tick those instead and continue waiting for the image output to be stable AND - // all active animations to complete. - if self.animations_active() { - self.process_animations(); - return Err(UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::AnimationsActive)); - } - } - Err(result) => { - return Err(UnableToComposite::NotReadyToPaintImage(result)) - } + // The current image may be ready to output. However, if there are animations active, + // tick those instead and continue waiting for the image output to be stable AND + // all active animations to complete. + if self.animations_active() { + self.process_animations(); + return Err(UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::AnimationsActive)); + } + if let Err(result) = self.is_ready_to_paint_image_output() { + return Err(UnableToComposite::NotReadyToPaintImage(result)) } } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index bc31e2d0dec..a00f24adf92 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -6533,6 +6533,18 @@ {} ] ], + "mozilla/request_animation_frame_reftest_wait.html": [ + [ + "/_mozilla/mozilla/request_animation_frame_reftest_wait.html", + [ + [ + "/_mozilla/mozilla/request_animation_frame_reftest_wait_ref.html", + "==" + ] + ], + {} + ] + ], "mozilla/restyle-out-of-document.html": [ [ "/_mozilla/mozilla/restyle-out-of-document.html", @@ -11037,6 +11049,11 @@ {} ] ], + "mozilla/request_animation_frame_reftest_wait_ref.html": [ + [ + {} + ] + ], "mozilla/resources/background-green.css": [ [ {} @@ -31446,6 +31463,14 @@ "df273cf90396cc2d3d3159ce72176122ab9518e5", "support" ], + "mozilla/request_animation_frame_reftest_wait.html": [ + "9c5ce337c92c9954475309f3865a9b47b59fbe4d", + "reftest" + ], + "mozilla/request_animation_frame_reftest_wait_ref.html": [ + "585548dfc915e3d53690e68ef07098044df39f1f", + "support" + ], "mozilla/resources/background-green.css": [ "bb230110dd1cf4647e020d7172bc375e972c7b41", "support" diff --git a/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait.html b/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait.html new file mode 100644 index 00000000000..6e07d2fb4f1 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait.html @@ -0,0 +1,12 @@ + + Mix requestAnimationFrame with reftest-wait + + + diff --git a/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait_ref.html b/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait_ref.html new file mode 100644 index 00000000000..d61dcbbffde --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/request_animation_frame_reftest_wait_ref.html @@ -0,0 +1,3 @@ + + Mix requestAnimationFrame with reftest-wait +