Closed Bug 1891040 Opened 6 months ago Closed 3 months ago

Regression: Toolbar animation in Fullscreen is not smooth on macOS Catalina

Categories

(Core :: Widget: Cocoa, defect, P3)

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- unaffected
firefox125 --- unaffected
firefox126 --- wontfix
firefox127 --- wontfix
firefox128 --- wontfix
firefox129 --- verified
firefox130 --- verified

People

(Reporter: mehmet.sahin, Assigned: bradwerth)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files, 1 obsolete file)

Nightly 126.0a1 (2024-04-11) (64-Bit)
macOS 10.15.7 Catalina

STR:

  1. Open a new window
  2. Switch into Fullscreen Mode
  3. Move the mouse cursor to the top of the screen so that the Toolbar appears/disappears

Actual: The animation is not smooth.

Expected: The Animation should be smooth.

This is a recent regression.

Attached video Expected_Smooth.mov
  • expected demo.
Summary: Regression: Toolbar animation is not smooth on macOS Catalina → Regression: Toolbar animation in Fullscreen is not smooth on macOS Catalina

I did a bisect: bwerth@: Can you please take a look at this regression? Thanks :)

Bug 1882358 Part 3: Remove nsIWidget::IsResizingNativeWidget, which is no longer used. r=nical

Differential Revision: https://phabricator.services.mozilla.com/D202868

2024-04-11T17:48:02.174000: DEBUG : Did not find a branch, checking all integration branches
2024-04-11T17:48:02.177000: INFO : The bisection is done.
2024-04-11T17:48:02.178000: INFO : Stopped

Flags: needinfo?(bwerth)
Keywords: regression
Regressed by: 1882358

FYI, this is only an issue on older macOS versions like macOS 10.15.7 Catalina. This is not an issue on newer macOS versions like macOS 14.4.1 Sonoma. Thanks for checking in advance.

Hmmm... something about changing the sync flushing behavior has caused this problem. Would you please navigate to "about:config" and modify the layers.force-synchronous-resize pref (either true or false) and re-test? Is there a value for that pref where this problem goes away?

Assignee: nobody → bwerth
Severity: -- → S3
Flags: needinfo?(bwerth) → needinfo?(mehmet.sahin)
Priority: -- → P3

(In reply to Brad Werth [:bradwerth] from comment #4)

Hmmm... something about changing the sync flushing behavior has caused this problem. Would you please navigate to "about:config" and modify the layers.force-synchronous-resize pref (either true or false) and re-test? Is there a value for that pref where this problem goes away?

Standard config for this flag is "true". Changing to "false" makes no difference unfortunately :(

Flags: needinfo?(mehmet.sahin)

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

For what it's worth, I see both behaviors (smooth and not-smooth) when testing current Nightly, on macOS Catalina.

Here's a screencast. The very first animation here is smooth, and then the ones that follow are mostly not-smooth, except near t=15s where I open a second tab and the animation is smooth again after that.

Not sure if there are particular triggers that make the animation smooth or not-smooth; or, perhaps this is just a perf/synchronization issue where one piece of code is falling behind another, and we miss our chance to play the animation.

(In reply to Daniel Holbert [:dholbert] from comment #7)

For what it's worth, I see both behaviors (smooth and not-smooth) when testing current Nightly, on macOS Catalina.

Thanks for this; this is helpful. This is showing that the difference between smooth and not-smooth is whether or not the page content is animated every frame of the resize. That means a sync flush (smooth) vs an async flush (not). The reason why the first animation with a new tab is smooth/sync is because the first flush is always sync. Perfect, makes sense!

So the potential fix is to make this toolbar appearance event be detected as resize-like even though the widget isn't actually resizing. That would allow the layers.force-synchronous-resize pref (on by default) to turn each frame into a sync flush. I'll work on that.

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

:bradwerth next week is the final week of beta for Fx126.
This is a P3, wondering if you plan on having a fix in time to uplift before Fx126 hits RC?

Flags: needinfo?(bwerth)

(In reply to Donal Meehan [:dmeehan] from comment #10)

:bradwerth next week is the final week of beta for Fx126.
This is a P3, wondering if you plan on having a fix in time to uplift before Fx126 hits RC?

I do not expect to have a fix ready. Investigation hasn't really begun yet.

Flags: needinfo?(bwerth)

As pointed out to me, the toolbar moving down is not done as a CSS animation, it is done as a repeatedly-set transform property that is driven by a key-value observation of the revealAmount property on the window. So it is an incorrect premise that this issue is due to our failure to sync flush scene build during a CSS animation. However, we clearly did do a sync flush scene build more often prior to the landing of Bug 1882358, and this effect looks smoother on macOS Catalina when that happens.

I'll see if I can find a better balance for our sync/async flush scene builds that will fix this issue.

Attachment #9400502 - Attachment is obsolete: true

Now that we do sync flushes less often, this provides a way to
temporarily force all flushes to be sync in order to achieve smooth
visual effects.

Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b67e54c213e Part 1: Add a mechanism to make CompositorBridgeChild use sync flush rendering. r=gfx-reviewers,nical https://hg.mozilla.org/integration/autoland/rev/288697e1b5c8 Part 2: Make nsChildView request sync flush rendering during critical animations. r=mac-reviewers,spohl
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

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

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

For more information, please visit BugBot documentation.

Flags: needinfo?(bwerth)

This is a fix for a narrow issue; it can ride the trains.

Flags: needinfo?(bwerth)

I was able to reproduce the issue on macOS 10.15 using Firefox 128.0a1.
Verified as fixed on macOS 10.15 using Firefox 129.0b9 and 130.0a1.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: