LibWeb: Only associate transition with element once

We already handle this within the above call to `Animation::set_effect`

Gains us 3 WPT tests.
This commit is contained in:
Callum Law 2025-08-13 16:34:59 +12:00 committed by Sam Atkins
commit 54f1407177
Notes: github-actions[bot] 2025-08-18 10:19:45 +00:00
4 changed files with 7 additions and 9 deletions

View file

@ -117,7 +117,6 @@ CSSTransition::CSSTransition(JS::Realm& realm, DOM::Element& element, Optional<P
set_timeline(element.document().timeline()); set_timeline(element.document().timeline());
set_owning_element(element); set_owning_element(element);
set_effect(m_keyframe_effect); set_effect(m_keyframe_effect);
element.associate_with_animation(*this);
element.set_transition(pseudo_element, m_transition_property, *this); element.set_transition(pseudo_element, m_transition_property, *this);
HTML::TemporaryExecutionContext context(realm); HTML::TemporaryExecutionContext context(realm);

View file

@ -2,13 +2,13 @@ Harness status: OK
Found 10 tests Found 10 tests
7 Pass 8 Pass
3 Fail 2 Fail
Pass After setting a transition's effect to null, it still reports the original transition property Pass After setting a transition's effect to null, it still reports the original transition property
Pass After setting a transition's effect to null, it becomes finished Pass After setting a transition's effect to null, it becomes finished
Pass After setting a transition's effect to null, style is updated Pass After setting a transition's effect to null, style is updated
Fail After setting a transition's effect to null, a new transition can be started Fail After setting a transition's effect to null, a new transition can be started
Fail After setting a transition's effect to null, it should be possible to interrupt that transition Pass After setting a transition's effect to null, it should be possible to interrupt that transition
Pass After setting a new keyframe effect with a shorter duration, the transition becomes finished Pass After setting a new keyframe effect with a shorter duration, the transition becomes finished
Pass After setting a new keyframe effect targeting different properties, the transition continues to report the original transition property Pass After setting a new keyframe effect targeting different properties, the transition continues to report the original transition property
Pass After setting a new keyframe effect on a play-pending transition, the transition remains pending Pass After setting a new keyframe effect on a play-pending transition, the transition remains pending

View file

@ -2,10 +2,9 @@ Harness status: OK
Found 5 tests Found 5 tests
4 Pass 5 Pass
1 Fail
Pass The start time of a newly-created transition is unresolved Pass The start time of a newly-created transition is unresolved
Fail The start time of transitions is based on when they are generated Pass The start time of transitions is based on when they are generated
Pass The start time of a transition can be set Pass The start time of a transition can be set
Pass The start time can be set to seek a transition Pass The start time can be set to seek a transition
Pass Seeking a transition using start time dispatches transition events Pass Seeking a transition using start time dispatches transition events

View file

@ -2,5 +2,5 @@ Harness status: OK
Found 1 tests Found 1 tests
1 Fail 1 Pass
Fail Ensure that transition easing functions are properly applied. Pass Ensure that transition easing functions are properly applied.