mIsSorted has incorrect/inverted polarity condition in AnimationEventDispatcher
Categories
(Core :: DOM: Animation, defect)
Tracking
()
People
(Reporter: mayankleoboy1, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Found via Claude :
AnimationEventDispatcher.cpp:111:
const bool wasEmpty = mPendingEvents.IsEmpty();
mPendingEvents.AppendElement(std::move(aEvent));
mIsSorted = !wasEmpty;
The polarity is inverted. Appending to an empty queue yields one element, which is trivially sorted; appending to a non-empty queue is exactly when order can break. It should be mIsSorted = wasEmpty;.
Since SortEvents early-returns on mIsSorted, QueueEvents (plural, correctly sets false) followed by QueueEvent (singular) marks the whole array sorted and skips the sort — so CSS events never get ordered against the appended playback event, even though Compare requires Web Animations events to precede CSS events at equal timestamps. Introduced by da2ca6b75df5 (Bug 1958970), which also made ScheduleDispatch() conditional on wasEmpty; the sortedness line looks like collateral of that edit. Only caller is Animation::QueuePlaybackEvent, so it's confined to onfinish/oncancel/onremove.
I'd want a WPT that queues a playback event after CSS events in one tick to confirm it's observable before filing — want me to write that test, or file the bug first?
Comment 1•27 days ago
|
||
Set release status flags based on info from the regressing bug 1958970
:emilio, since you are the author of the regressor, bug 1958970, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•27 days ago
|
| Assignee | ||
Comment 2•27 days ago
|
||
Will add a test if there's no WPT for this.
Updated•27 days ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61541 for changes under testing/web-platform/tests
Comment 5•25 days ago
|
||
| bugherder | ||
Comment 6•25 days ago
|
||
The patch landed in nightly and beta is affected, along with ESR.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta and ESR approvals.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox154and the ESR status flag(s) towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•25 days ago
|
Upstream PR merged by moz-wptsync-bot
Updated•24 days ago
|
Description
•