Commit Graph

13 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
0a348c394c 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.

(cherry picked from commit 94b3b84dd808b6607e8fd0aead1796709f3a8721)
2024-11-04 13:15:58 -05:00
ChaseKnowlden
1c2b74966a LibWeb: Remove associated transitions when clearing transitions
This fixes a crash on nextjs.org

(cherry picked from commit ee54f9ee9567021f7fa8891e995a75f017aa6828)
2024-11-04 13:15:58 -05:00
Matthew Olsson
180c74d3d8 LibWeb: Store property transitions in Animatable
Co-authored-by: Sam Atkins <sam@ladybird.org>
(cherry picked from commit 392510c631a4b01dd03f853389094cb54e6d3f0b)
2024-11-04 13:15:58 -05:00
Aliaksandr Kalenik
57000ba58f LibWeb: Add slots for pseudo-elements animation cache in Animatable
Fixes the bug when animation does not run at all if an element has a
pseudo-element, because both of them use the same cache.

(cherry picked from commit 4049cce40cce31c45e528bbdf301b4e63b8912db)
2024-10-19 20:56:00 -04:00
Matthew Olsson
a80af938eb LibWeb: Support subtree option in Animatable.getAnimations() 2024-06-02 16:07:12 +02:00
Matthew Olsson
2bd8093449 LibWeb: Detect explicit null timeline given in KeyframeAnimationOptions
We already do this for the timeline argument in the KeyframeEffect
constructor
2024-05-29 08:18:24 +02:00
Andreas Kling
53d0dd4a2e LibJS+LibWeb: Use new Cell::Visitor helpers to avoid manual iteration 2024-04-16 07:40:01 +02:00
Matthew Olsson
90290eb985 LibWeb: Store Animations in Animatable instead of AnimationEffects
This is closer to what the spec instructs us to do, and matches how
associations are maintained in the timelines. Also note that the removed
destructor logic is not necessary since we visit the associated
animations anyways.
2024-03-09 15:34:27 +01:00
Matthew Olsson
24ec5838ba LibWeb: Visit Animatable::m_associated_effects 2024-03-09 15:34:27 +01:00
Matthew Olsson
3ea26327c7 LibWeb: Implement Animatable::get_animations() 2024-02-21 19:52:35 +01:00
Matthew Olsson
5eea53f27a LibWeb: Keep track of associated AnimationEffects in Animatable 2024-02-21 19:52:35 +01:00
Matthew Olsson
7d5e17eddd LibWeb: Implement Animatable::animate() 2024-02-19 12:21:48 +01:00
Matthew Olsson
daaaaec2d0 LibWeb: Add the Animatable IDL object 2024-02-15 12:34:19 +01:00