mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Cancel animations when element is moved in display none subtree
We already have logic to play or cancel animations in an element's subtree when the display property changes to or from none. However, this was not sufficient to cover the case when an element starts/stops being nested in display none after insertion.
This commit is contained in:
parent
f148af0a93
commit
b92a8553c7
Notes:
github-actions[bot]
2025-03-04 17:37:15 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: b92a8553c7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3800
7 changed files with 126 additions and 64 deletions
|
@ -2605,7 +2605,7 @@ GC::Ref<ComputedProperties> StyleComputer::compute_properties(DOM::Element& elem
|
|||
effect->set_target(&element);
|
||||
element.set_cached_animation_name_animation(animation, pseudo_element);
|
||||
|
||||
if (!element.has_display_none_ancestor()) {
|
||||
if (!element.has_inclusive_ancestor_with_display_none()) {
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
animation->play().release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue