mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-13 04:21:54 +00:00
LibWeb: Implement linear easing according to latest spec
This commit is contained in:
parent
3f79d93bd3
commit
c67ecf37f7
Notes:
github-actions[bot]
2024-11-05 10:42:28 +00:00
Author: https://github.com/Gingeh
Commit: c67ecf37f7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2151
Reviewed-by: https://github.com/AtkinsSJ ✅
9 changed files with 513 additions and 49 deletions
|
@ -994,6 +994,8 @@ void StyleComputer::collect_animation_into(DOM::Element& element, Optional<CSS::
|
|||
|
||||
auto& keyframes = effect->key_frame_set()->keyframes_by_key;
|
||||
|
||||
// FIXME: Support progress values outside [0-1]
|
||||
output_progress = clamp(output_progress.value(), 0, 1);
|
||||
auto key = static_cast<u64>(output_progress.value() * 100.0 * Animations::KeyframeEffect::AnimationKeyFrameKeyScaleFactor);
|
||||
auto matching_keyframe_it = keyframes.find_largest_not_above_iterator(key);
|
||||
if (matching_keyframe_it.is_end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue