mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00: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: 360082544c
Pull-request: https://github.com/SerenityOS/serenity/pull/23079
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 2 additions and 2 deletions
|
@ -240,8 +240,8 @@ Optional<double> AnimationEffect::active_time_using_fill(Bindings::FillMode fill
|
||||||
|
|
||||||
// -> If the fill mode is forwards or both,
|
// -> If the fill mode is forwards or both,
|
||||||
if (fill_mode == Bindings::FillMode::Forwards || fill_mode == Bindings::FillMode::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 the result of evaluating max(min(local time - start delay, active duration), 0).
|
||||||
return max(local_time().value() - m_start_delay - active_duration(), 0.0);
|
return max(min(local_time().value() - m_start_delay, active_duration()), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -> Otherwise,
|
// -> Otherwise,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue