LibWeb: Fix incorrect Animation active_time in the after phase

This commit is contained in:
Matthew Olsson 2024-02-04 17:23:01 -07:00 committed by Andreas Kling
parent 16a21a503d
commit 360082544c
Notes: sideshowbarker 2024-07-17 10:10:18 +09:00

View File

@ -240,8 +240,8 @@ Optional<double> AnimationEffect::active_time_using_fill(Bindings::FillMode fill
// -> If the fill mode is forwards or both,
if (fill_mode == Bindings::FillMode::Forwards || fill_mode == Bindings::FillMode::Both) {
// Return the result of evaluating max(local time - start delay - active duration, 0).
return max(local_time().value() - m_start_delay - active_duration(), 0.0);
// Return the result of evaluating max(min(local time - start delay, active duration), 0).
return max(min(local_time().value() - m_start_delay, active_duration()), 0.0);
}
// -> Otherwise,