mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Fix incorrect Animation active_time in the after phase
This commit is contained in:
parent
16a21a503d
commit
360082544c
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/360082544c Pull-request: https://github.com/SerenityOS/serenity/pull/23079 Reviewed-by: https://github.com/AtkinsSJ ✅
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user