mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Correctly sort animations returned by getAnimations()
This commit is contained in:
parent
2c389ae96c
commit
b7a71ca950
Notes:
github-actions[bot]
2025-11-10 17:30:34 +00:00
Author: https://github.com/Psychpsyo
Commit: b7a71ca950
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6777
Reviewed-by: https://github.com/gmta ✅
6 changed files with 284 additions and 14 deletions
|
|
@ -627,11 +627,12 @@ void KeyframeEffect::generate_initial_and_final_frames(RefPtr<KeyFrameSet> keyfr
|
|||
// https://www.w3.org/TR/web-animations-1/#animation-composite-order
|
||||
int KeyframeEffect::composite_order(GC::Ref<KeyframeEffect> a, GC::Ref<KeyframeEffect> b)
|
||||
{
|
||||
// 1. Let the associated animation of an animation effect be the animation associated with the animation effect.
|
||||
// The relative composite order of any two keyframe effects A and B within an effect stack is established by
|
||||
// comparing their properties as follows:
|
||||
auto a_animation = a->associated_animation();
|
||||
auto b_animation = b->associated_animation();
|
||||
|
||||
// 2. Sort A and B by applying the following conditions in turn until the order is resolved,
|
||||
// 1. Sort A and B by applying the following conditions in turn until the order is resolved,
|
||||
|
||||
// 1. If A and B’s associated animations differ by class, sort by any inter-class composite order defined for
|
||||
// the corresponding classes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue