mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
Merge 314eb28805
into 8e37cd2f71
This commit is contained in:
commit
11268e67cb
3 changed files with 28 additions and 2 deletions
|
@ -287,11 +287,11 @@ double EasingStyleValue::CubicBezier::evaluate_at(double input_progress, bool) c
|
|||
}))
|
||||
return found->y;
|
||||
|
||||
if (nearby_index == m_cached_x_samples.size() || nearby_index + 1 == m_cached_x_samples.size()) {
|
||||
if (nearby_index + 1 >= m_cached_x_samples.size()) {
|
||||
// Produce more samples until we have enough.
|
||||
auto last_t = m_cached_x_samples.last().t;
|
||||
auto last_x = m_cached_x_samples.last().x;
|
||||
while (last_x <= x && last_t < 1.0) {
|
||||
while (last_x <= x || last_t < 1.0) {
|
||||
last_t += 1. / 60.;
|
||||
auto solution = solve(last_t);
|
||||
m_cached_x_samples.append(solution);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
PASS! (Didn't crash)
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
#foo {
|
||||
animation-name: move;
|
||||
animation-duration: 2s;
|
||||
animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
|
||||
animation-iteration-count: 0.1;
|
||||
animation-direction: reverse;
|
||||
}
|
||||
|
||||
@keyframes move {}
|
||||
</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>
|
Loading…
Add table
Reference in a new issue