Closed Bug 1888748 Opened 8 months ago Closed 7 months ago

rAF movement applied to spaced elements with a transition, coming into the viewport from off screen, has a delay

Categories

(Core :: CSS Transitions and Animations, defect, P2)

Firefox 124
Desktop
All
defect

Tracking

()

VERIFIED FIXED
127 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- wontfix
firefox125 + verified
firefox126 + verified
firefox127 + verified

People

(Reporter: broflav11, Assigned: emilio)

References

(Blocks 1 open bug, Regressed 1 open bug, Regression)

Details

(Keywords: perf-alert, regression)

Attachments

(2 files)

Attached file firefox.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

The test case is something similar to a slider in which several elements are translated, each using its own requestAnimationFrame function, while also applying a transition on the elements as they are getting translated.
So basically a group of elements in a stage with hidden overflow, with a bit of spacing between them.

Actual results:

The elements that are currently off screen but coming into the viewport are translating with a delay compared to the element that was initially in the viewport.

Expected results:

All the elements should translate in lockstep, displaying the same pace of movement, same easing from the transitions, as the same numerical transformations and transitions are applied in parallel.

Just to make sure we're on the same page, here are some videos demonstrating the rendering bug:

Latest Firefox (124.0)
https://i.imgur.com/TzfeESK.mp4

Previous major version (123.0)
https://i.imgur.com/VRY9FET.mp4

Chrome latest (123.0) for comparison
https://i.imgur.com/4t3w8eb.mp4

I should mention that if I disable the transition applied to the elements, the delay disappears. Same if I remove any spacing bewteen them and they're all flush within their container.

It's the second rendering bug I'm reporting as I work on a library and every several Firefox versions there's a rendering bug that ruins a significant part of the library. Which doesn't make me very optimistic about providing a consistent experience for users when even core rendering issues like this appear frequently in Firefox.

What changes did you make to the renderer from 123 to 124 that created this problem?
It affects a very basic feature: mixing requestAnimationFrame with a CSS transition leads to delays in the rendering of elements that have some space between them and come from outside the viewport.
I would say it's a pretty serious bug and likely to break any sites that mix rAF with a transition applied to elements that aren't perfectly adjacent.

I can confirm this report in both Windows 10 and MacOS 11 with Nightly v126.0a1 and Release v124.0.2, but not in ESR v115.9.1esr.
The regressor appears to be bug 1864425.

I am sorry for the late reply. Thank you for your report!

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Component: Untriaged → CSS Transitions and Animations
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Product: Firefox → Core
Regressed by: 1864425
Hardware: Unspecified → Desktop

:emilio, since you are the author of the regressor, bug 1864425, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Attachment #9396438 - Attachment description: WIP: Bug 1888748 - Ensure animations started on the same tick share ready time. r=birtles → Bug 1888748 - Ensure animations started on the same tick share ready time. r=birtles,#firefox-animation-reviewers
Status: NEW → ASSIGNED

Thanks for the report and the (super useful) test-case! This actually got to my radar just in time since a couple other related bugs had made it but those didn't have reduced (ish) test-cases :)

(In reply to Tudor from comment #4)

Do I have to get your CEO on the phone for someone to take a look at this bug?
I will do it

I understand the frustration, but a bug filed in the general component and without a regression range has to be triaged appropriately in order to find the right person to look at it (me in this case). For the next time, if the bug is a regression, it's more productive to use mozregression to figure out what broke it, rather than making this kind of comment.

[Tracking Requested - why for this release]: Regression from 124 which affects perceived performance. Fix should be simple enough.

Flags: needinfo?(emilio)
Severity: -- → S2
Priority: -- → P2
Blocks: 1891036

RE: Comment 8

I understand the frustration, but a bug filed in the general component and without a regression range has to be triaged appropriately in order to find the right person to look at it (me in this case). For the next time, if the bug is a regression, it's more productive to use mozregression to figure out what broke it, rather than making this kind of comment.

I have been given this suggestion before but I didn't have time to invest in learning how to use the regression tool. I did my best just downloading a few previous Firefox versions, disabling automatic updates, and checking which major release was still working right and which deviated. So I tracked it down to version 124 being the likely culprit. Then built a simplified test case with some comments to make it more explicit what was being done on each step.

Maybe my tone was harsh, but I've been working for years on a library that relies on synchronised translation of elements and this update just broke a significant feature and I was thinking my work just went out the window and now I had to disable features to keep it minimally functional.
And I saw that newer bugs that were not so critical were being triaged while this one was ignored and I didn't understand why.

Thanks for picking it up eventually. 👌

Blocks: 1891017

Too late to land a fix for 125.0 at this point (it ships Tuesday and the RC build is already created), but we can keep it on the radar for the scheduled dot release going out on April 30 if all goes well.

Duplicate of this bug: 1891036
Blocks: 1825395
No longer blocks: 1891036

Set release status flags based on info from the regressing bug 1864425

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d06a0d7b3413 Ensure animations started on the same tick share ready time. r=birtles
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45758 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox126 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Comment on attachment 9396438 [details]
Bug 1888748 - Ensure animations started on the same tick share ready time. r=birtles,#firefox-animation-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Comment 0 and dependencies
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively small fix.
  • String changes made/needed: none
  • Is Android affected?: Yes
Flags: needinfo?(emilio)
Attachment #9396438 - Flags: approval-mozilla-release?
Attachment #9396438 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9396438 [details]
Bug 1888748 - Ensure animations started on the same tick share ready time. r=birtles,#firefox-animation-reviewers

Approved for 126.0b3

Attachment #9396438 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I can confirm the fix in Nightly v127.0a1 In Windows 10, MacOS 11 and Ubuntu 22. The branch 126 will be verified when a fixed build is available.

I have also verified this fix in Beta v126.0b3 on Windows 10 and MacOS 11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9396438 [details]
Bug 1888748 - Ensure animations started on the same tick share ready time. r=birtles,#firefox-animation-reviewers

Approved for 125.0.3

Attachment #9396438 - Flags: approval-mozilla-release? → approval-mozilla-release+
See Also: → 1892367

(In reply to Pulsebot from comment #13)

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d06a0d7b3413
Ensure animations started on the same tick share ready time. r=birtles

Perfherder has detected a talos performance change from push d06a0d7b341361ec7d0e996636f94a7ebd68b92e.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
34% tart linux1804-64-shippable-qr e10s fission stylo webrender-sw 3.73 -> 2.47
32% tart windows10-64-shippable-qr e10s fission stylo webrender-sw 3.18 -> 2.16
32% tart linux1804-64-shippable-qr e10s fission stylo webrender 3.98 -> 2.71
32% tart windows10-64-shippable-qr e10s fission stylo webrender 3.48 -> 2.38
31% tart windows10-64-shippable-qr e10s fission stylo webrender-sw 3.18 -> 2.19
... ... ... ... ...
30% tart macosx1015-64-shippable-qr e10s fission stylo webrender-sw 2.60 -> 1.83

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 16

For more information on performance sheriffing please see our FAQ.

Keywords: perf-alert

I can also confirm this fix in Firefox Release v125.0.3 in Windows 10 and MacOS 11.

Regressions: 1894368
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: