mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Avoid unnecessary sorting work when getting animations
This way, the list is not re-sorted on every recursive call.
This commit is contained in:
parent
1abc91ccc6
commit
693dd7b6f6
Notes:
github-actions[bot]
2025-11-26 21:20:28 +00:00
Author: https://github.com/Psychpsyo
Commit: 693dd7b6f6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6879
Reviewed-by: https://github.com/gmta ✅
6 changed files with 26 additions and 11 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <LibGfx/Font/Typeface.h>
|
||||
#include <LibGfx/Font/WOFF/Loader.h>
|
||||
#include <LibGfx/Font/WOFF2/Loader.h>
|
||||
#include <LibWeb/Animations/Animatable.h>
|
||||
#include <LibWeb/Animations/AnimationEffect.h>
|
||||
#include <LibWeb/Animations/DocumentTimeline.h>
|
||||
#include <LibWeb/Bindings/PrincipalHostDefined.h>
|
||||
|
|
@ -2573,7 +2574,9 @@ GC::Ref<ComputedProperties> StyleComputer::compute_properties(DOM::AbstractEleme
|
|||
// 5. Add or modify CSS-defined animations
|
||||
process_animation_definitions(computed_style, abstract_element);
|
||||
|
||||
auto animations = abstract_element.element().get_animations_internal(Animations::GetAnimationsOptions { .subtree = false });
|
||||
auto animations = abstract_element.element().get_animations_internal(
|
||||
Animations::Animatable::GetAnimationsSorted::Yes,
|
||||
Animations::GetAnimationsOptions { .subtree = false });
|
||||
if (animations.is_exception()) {
|
||||
dbgln("Error getting animations for element {}", abstract_element.debug_description());
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue