LibWeb: Use machine epsilon when approximating cubic bezier

This commit is contained in:
Gingeh 2024-11-02 20:23:50 +11:00 committed by Alexander Kalenik
commit c2cd191864
Notes: github-actions[bot] 2024-11-03 16:36:14 +00:00
3 changed files with 29 additions and 4 deletions

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<style>
#foo {
animation-name: anim;
animation-play-state: paused;
animation-fill-mode: forwards;
animation-timing-function: cubic-bezier(0.4, 0.1, 1, 0);
}
@keyframes anim {}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
asyncTest(async (done) => {
const foo = document.getElementById("foo");
const anim = foo.getAnimations()[0];
anim.onfinish = function () {
println("PASS! (Didn't crash)");
done();
};
anim.play();
});
</script>