mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Account for pending playback rate changes when playing animation
The spec calls for us to use the effective playback rate (i.e. including any pending updates) when playing an animation. Fixes a timeout in the newly imported test.
This commit is contained in:
committed by
Alexander Kalenik
parent
16d1498bb0
commit
d1e8788d43
Notes:
github-actions[bot]
2025-12-23 13:56:14 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d1e8788d43d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7174 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -23,14 +23,13 @@
|
||||
|
||||
anim = foo.animate({}, { duration: Infinity });
|
||||
anim.cancel();
|
||||
anim.playbackRate = -1;
|
||||
try {
|
||||
// anim.play() would throw here
|
||||
anim.reverse();
|
||||
} catch {
|
||||
println("Cannot reverse an animation with an infinite effect end");
|
||||
}
|
||||
if (anim.playbackRate === -1)
|
||||
if (anim.playbackRate === 1)
|
||||
println("reverse() does not update the playback rate if calling play() would throw an exception");
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user