mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02: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:
committed by
Andreas Kling
parent
441c1a29ae
commit
c39ef2a738
Notes:
github-actions[bot]
2024-12-25 16:15:16 +00:00
Author: https://github.com/LucasChollet Commit: https://github.com/LadybirdBrowser/ladybird/commit/c39ef2a7383 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3024
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user