diff --git a/Userland/Libraries/LibWeb/Animations/AnimationEffect.cpp b/Userland/Libraries/LibWeb/Animations/AnimationEffect.cpp index 3c965debe3..c9fa8f5ba3 100644 --- a/Userland/Libraries/LibWeb/Animations/AnimationEffect.cpp +++ b/Userland/Libraries/LibWeb/Animations/AnimationEffect.cpp @@ -240,8 +240,8 @@ Optional 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,