mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/Animations: Don't assume that animations have an effect
I agree that the spec definition of this function isn't super clear about that, but from "Web Animations 1 - 4.5. Animations"[1]: An animation is a timing node that binds an animation effect child, called its associated effect, to a timeline parent so that it runs. Both of these associations are optional and configurable such that an animation can have no associated effect or timeline at a given moment. [1]: https://drafts.csswg.org/web-animations-1/#animations
This commit is contained in:
parent
441c1a29ae
commit
c39ef2a738
Notes:
github-actions[bot]
2024-12-25 16:15:16 +00:00
Author: https://github.com/LucasChollet
Commit: c39ef2a738
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3024
1 changed files with 1 additions and 1 deletions
|
@ -314,7 +314,7 @@ bool Animation::is_relevant() const
|
|||
// An animation is relevant if:
|
||||
// - Its associated effect is current or in effect, and
|
||||
// - Its replace state is not removed.
|
||||
return (m_effect->is_current() || m_effect->is_in_effect()) && replace_state() != Bindings::AnimationReplaceState::Removed;
|
||||
return (m_effect && (m_effect->is_current() || m_effect->is_in_effect())) && replace_state() != Bindings::AnimationReplaceState::Removed;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#replaceable-animation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue