mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Don't allow "display: none" start CSS animations
This is both a correctness fix and a performance optimization.
This commit is contained in:
parent
93f9ed72d2
commit
0cfe90b59e
Notes:
github-actions[bot]
2025-02-01 12:42:56 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 0cfe90b59e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3403
Reviewed-by: https://github.com/LucasChollet ✅
6 changed files with 116 additions and 7 deletions
|
@ -2502,8 +2502,10 @@ GC::Ref<ComputedProperties> StyleComputer::compute_properties(DOM::Element& elem
|
|||
effect->set_target(&element);
|
||||
element.set_cached_animation_name_animation(animation, pseudo_element);
|
||||
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
animation->play().release_value_but_fixme_should_propagate_errors();
|
||||
if (!element.has_display_none_ancestor()) {
|
||||
HTML::TemporaryExecutionContext context(realm);
|
||||
animation->play().release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
} else {
|
||||
// The animation hasn't changed, but some properties of the animation may have
|
||||
if (auto animation = element.cached_animation_name_animation(pseudo_element); animation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue