mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Early return when invalidations=none in animation style update
This allows to skip a bunch of unnecessary work performed by `apply_style()`.
This commit is contained in:
parent
1e07227e98
commit
9dd59e0673
Notes:
github-actions[bot]
2025-02-17 23:25:43 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 9dd59e0673
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3604
1 changed files with 3 additions and 0 deletions
|
@ -938,6 +938,9 @@ void KeyframeEffect::update_computed_properties()
|
|||
|
||||
auto invalidation = compute_required_invalidation(animated_properties_before_update, style->animated_property_values());
|
||||
|
||||
if (invalidation.is_none())
|
||||
return;
|
||||
|
||||
// Traversal of the subtree is necessary to update the animated properties inherited from the target element.
|
||||
target->for_each_in_subtree_of_type<DOM::Element>([&](auto& element) {
|
||||
auto element_invalidation = element.recompute_inherited_style();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue