mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Make sure style is up-to-date in getAnimations()
StyleComputer is responsible for assigning animation targets, so we have to make sure there are no pending style updates before querying animations of an element. This change also introduces a version of getAnimations() that does not check style updates and used by StyleComputer to avoid mutual recursion.
This commit is contained in:
parent
c412181683
commit
94b3b84dd8
Notes:
github-actions[bot]
2024-10-02 15:29:35 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 94b3b84dd8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1600
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 35 additions and 1 deletions
|
@ -1563,7 +1563,7 @@ void StyleComputer::compute_cascaded_values(StyleProperties& style, DOM::Element
|
|||
}
|
||||
}
|
||||
|
||||
auto animations = element.get_animations({ .subtree = false });
|
||||
auto animations = element.get_animations_internal({ .subtree = false });
|
||||
for (auto& animation : animations) {
|
||||
if (auto effect = animation->effect(); effect && effect->is_keyframe_effect()) {
|
||||
auto& keyframe_effect = *static_cast<Animations::KeyframeEffect*>(effect.ptr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue