mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Consider cancelled (idle) transitions as "completed"
This commit is contained in:
parent
b2b889e1da
commit
67a3d0f1aa
Notes:
github-actions[bot]
2025-11-23 08:44:31 +00:00
Author: https://github.com/Calme1709
Commit: 67a3d0f1aa
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6854
Reviewed-by: https://github.com/gmta ✅
2 changed files with 8 additions and 8 deletions
|
|
@ -1305,8 +1305,8 @@ void StyleComputer::start_needed_transitions(ComputedProperties const& previous_
|
|||
auto const& after_change_value = new_style.property(property_id, ComputedProperties::WithAnimationsApplied::No);
|
||||
|
||||
auto existing_transition = element.property_transition(pseudo_element, property_id);
|
||||
bool has_running_transition = existing_transition && !existing_transition->is_finished();
|
||||
bool has_completed_transition = existing_transition && existing_transition->is_finished();
|
||||
bool has_running_transition = existing_transition && !existing_transition->is_finished() && !existing_transition->is_idle();
|
||||
bool has_completed_transition = existing_transition && (existing_transition->is_finished() || existing_transition->is_idle());
|
||||
|
||||
auto start_a_transition = [&](auto delay, auto start_time, auto end_time, auto const& start_value, auto const& end_value, auto const& reversing_adjusted_start_value, auto reversing_shortening_factor) {
|
||||
dbgln_if(CSS_TRANSITIONS_DEBUG, "Starting a transition of {} from {} to {}", string_from_property_id(property_id), start_value.to_string(SerializationMode::Normal), end_value.to_string(SerializationMode::Normal));
|
||||
|
|
@ -1483,7 +1483,7 @@ void StyleComputer::start_needed_transitions(ComputedProperties const& previous_
|
|||
auto const& existing_transition = element.property_transition(pseudo_element, property_id);
|
||||
|
||||
dbgln_if(CSS_TRANSITIONS_DEBUG, "Transition step 3.");
|
||||
if (!existing_transition->is_finished())
|
||||
if (!existing_transition->is_finished() && !existing_transition->is_idle())
|
||||
existing_transition->cancel();
|
||||
else
|
||||
element.remove_transition(pseudo_element, property_id);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 96 tests
|
||||
|
||||
41 Pass
|
||||
55 Fail
|
||||
44 Pass
|
||||
52 Fail
|
||||
Pass Animation of font in ::marker
|
||||
Pass Animation of font-family in ::marker
|
||||
Fail Animation of font-feature-settings in ::marker
|
||||
|
|
@ -56,9 +56,9 @@ Pass Transition of font in ::marker
|
|||
Pass Transition of font-family in ::marker
|
||||
Pass Transition of font-feature-settings in ::marker
|
||||
Pass Transition of font-kerning in ::marker
|
||||
Fail Transition of font-size in ::marker
|
||||
Pass Transition of font-size in ::marker
|
||||
Fail Transition of font-size-adjust in ::marker
|
||||
Fail Transition of font-stretch in ::marker
|
||||
Pass Transition of font-stretch in ::marker
|
||||
Pass Transition of font-style in ::marker
|
||||
Fail Transition of font-synthesis in ::marker
|
||||
Fail Transition of font-synthesis-small-caps in ::marker
|
||||
|
|
@ -71,7 +71,7 @@ Pass Transition of font-variant-ligatures in ::marker
|
|||
Pass Transition of font-variant-numeric in ::marker
|
||||
Pass Transition of font-variant-position in ::marker
|
||||
Fail Transition of font-weight in ::marker
|
||||
Fail Transition of line-height in ::marker
|
||||
Pass Transition of line-height in ::marker
|
||||
Pass Transition of white-space in ::marker
|
||||
Pass Transition of color in ::marker
|
||||
Fail Transition of text-combine-upright in ::marker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue