LibWeb: Make transition order return -1 and 1 instead of 0 and 1

The old behavior was plain incorrect for a sorting function.
This commit is contained in:
Psychpsyo 2025-11-11 20:30:04 +01:00 committed by Jelle Raaijmakers
parent 2c4f2a3cb6
commit e0b5bd7894
Notes: github-actions[bot] 2025-11-11 20:58:52 +00:00
3 changed files with 8 additions and 5 deletions

View file

@ -78,7 +78,7 @@ int CSSTransition::class_specific_composite_order(GC::Ref<Animations::Animation>
// property name of each transition (i.e. without attempting case conversion and such that -moz-column-width
// sorts before column-width).
// FIXME: This should operate on Unicode strings, not StringViews.
return transition_property() > other->transition_property();
return transition_property().compare(other->transition_property());
}
CSSTransition::CSSTransition(JS::Realm& realm, DOM::AbstractElement abstract_element, PropertyID property_id, size_t transition_generation,