Closed Bug 2063751 Opened 1 month ago Closed 1 month ago

Download button on toolbar has weird sideways movement as the download animation progresses/completes, at certain fractional desktop scale factors (e.g. 133%, 166%, 250%)

Categories

(Firefox :: Downloads Panel, defect, P1)

defect

Tracking

()

VERIFIED FIXED
156 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox154 --- unaffected
firefox155 + verified
firefox156 + verified

People

(Reporter: dholbert, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(7 files, 1 obsolete file)

Attached video screencast of bug —

STR:

  1. Download a file. e.g. choose one of the download options from https://www.firefox.com/en-US/thanks/
  2. Watch the download icon on your toolbar carefully, as it animates to show download progress and then the completed download.

ACTUAL RESULTS:
The animation has some parts where it "slides sideways" a bit and then snaps back into place. When it slides sideways, it reveals a little bit of a different phase of the animation that looks like it shouldn't be visible.

EXPECTED RESULTS:
No such sideways sliding.

I'm using Nightly 156.0a1 (2026-08-14) (64-bit) on Ubuntu 26.04.

Here's a performance profile that captures the bug -- you can sort-of see it in the screenshots track, but the images are downscaled/compressed so it's a bit garbled in places: https://share.firefox.dev/4wqE17t

Nightly 2026-08-01 shows EXPECTED RESULTS, so this seems to be a regression. I'll track down a regression range...

In bisecting, I found bug 2057645 where it looks like we updated the animations - pretty sure this would be a regression from that.

At first I thought maybe what I was seeing was just the updated design, but I don't think it is -- bug 2057645's phab revision has a screencast of the intended behavior, here:
https://mozphab-phabhost-cdn.devsvcprod.mozaws.net/file/download/hnztffdxjxg6ivocujxk/PHID-FILE-bfhkovz2sqq6v3b4s4cn/video.mp4
...which does not have the sideways motion that I'm seeing locally.

Flags: needinfo?(git)
Regressed by: 2057645

Aha, so this only reproduces if I have a fractional scale value in my Ubuntu system settings. I tested a few different scale options (Ubuntu gives me many choices on my setup):
100%: fine.
125%: fine. (Maybe very slight sideways movement, but I might be imagining it.)
133%: Buggy.
166%: Buggy.
250%: Buggy.
266%: fine.

The "Buggy" zoom levels all look essentially like my screencast, with the icon slipping sideways as it animates and occasionally snapping into place.
I typically run with 166% scale factor, and builds before the regression worked fine at that scale factor.

Summary: Download button on toolbar has weird sideways movement as the download animation progresses/completes → Download button on toolbar has weird sideways movement as the download animation progresses/completes, at certain fractional desktop scale factors (e.g. 133%, 166%, 250%)

(if it helps, here's a screencast where I hit the bug multiple times in a row, with a bit more surroundings visible.)

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

In bisecting, I found bug 2057645 where it looks like we updated the animations - pretty sure this would be a regression from that.

Verified that this was the regressor. Testing with 166% scale factor in my system settings, this is "bad" (the revision for bug 2057645):

mozregression --repo autoland --launch 135fa4853d964edc505b0961c9a085914320a8a0

...whereas this is "good" (bug 2057645's parent revision):

mozregression --repo autoland --launch eef056ac9141ab1c71e1bf1bbd879f583b212661

For completeness, I tested all of the "Buggy" scale factors from comment 4, using the last-good-build (final command in comment 6), and they all look "good" in that build.

So the last-good build was indeed robustly good at all of these scale factors.

[Tracking Requested - why for this release]: visual regression in prominent bit of UI (though fortunately only affecting a subset of users with various fractional scale factors)

oh nooo ˙◠˙

Emilio any idea why this is happening? This is the updated code, but I don't understand how the zoom factor affects the animated offset (and why the new animations have this behavior and the old ones didn't)

Flags: needinfo?(git) → needinfo?(emilio)

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

175% is also broken.

I don't think you removed the tracking flag intentionally Juliana, right?

I think this is hitting some sort of pixel-snapping issue, the image is mispositioned even when the animation isn't running.

If I remove the transform: translateX(0) from the element it corrects itself, which is a bit sketchy.

Attached file Test-case —

I can reproduce the mispositioning in this test-case. Probably something due to the structure of the SVG then.

Ok, I got it. I think this is effectively a Gecko bug. We snap image rects in a way that might distort the aspect ratio slightly here. And due to how SVG drawing works (the default preserveAspectRatio) it gets downscaled then centered.

The fix on the asset side is trivial tho.

Blocks: 2063903

Filed bug 2063903 for the Gecko side bug.

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Status: NEW → ASSIGNED

This is specific to an SVG asset that displays only with browser.nova.enabled, which won't be enabled by default until 157. We would like to fix before 157. Corrected by comment 23

Setting S3 since it's a purely visual glitch, although the additional motion may be disruptive to some users.

Severity: -- → S3
Priority: -- → P1
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3e6c5d70380a https://hg.mozilla.org/integration/autoland/rev/f02cd1d3a8cb Use preserveAspectRatio="none" for download animations. r=desktop-theme-reviewers,sfoster

I just realized that a slightly-simpler solution here would be to just remove the viewBox (in which case we'll get one synthesized for free using the SVG height and width attributes -- which matches the one that we've got hardcoded here -- and we get preserveAspectRatio="none" synthesized for free as well).

I mentioned this on bug 2064177 just now, where we'll likely be fixing up a few other SVG assets. If we remove attributes over there (as I think we should), then we'll likely want to adjust the SVG assets that we just fixed up here, as part of that bug, to remove the viewBox and preserveAspectRatio attributes, for completeness/consistency.

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch

(In reply to Stephen Thompson [:sthompson] from comment #19)

This is specific to an SVG asset that displays only with browser.nova.enabled, which won't be enabled by default until 157.

Correction: we show this same download-animation -- and hit the same bug -- even when Nova is switched off. I just double-checked and confirmed that I hit the bug with Nova disabled, in a Nightly from a few days ago.

I just tested beta (Firefox 155.0b1) with a fresh profile, and confirmed it's affected.

--> Restoring firefox155 status to affected. We should request beta uplift. I'll do that over on bug 2064177, since that bug's patches should just get uplifted as a stack with this patch (since bug 2064177 is a simplification on what landed here, plus a fix for more files).

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

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

Fine, fine...

Flags: needinfo?(emilio)
Attachment #9627940 - Flags: approval-mozilla-beta?
Attachment #9627941 - Flags: approval-mozilla-beta?
Attachment #9627940 - Attachment is obsolete: true
Attachment #9627940 - Flags: approval-mozilla-beta?

synced up with emilio; we're using https://phabricator.services.mozilla.com/D319536 as the uplift request here (since it's part of a stack with the patch for followup bug 2064177).

Attachment #9627941 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift] [qa-ver-needed-c156/b155]

Thank you so much y'all!
I updated the filmstrip generator to not set viewBox anymore

Hello! Reproduced the issue with Firefox 156.0a1 (2026-08-14) on Ubuntu 26 with 133% scale on the test case from comment 15 and with 160% scale on the download button.

Verification results on Ubuntu 26.04 (Scales tested: 100%, 125%, 133%, 150%, 166%, 200%):

  • Browser Download Icon: Displays correctly on all tested scales across both Firefox 156.0a1 (2026-08-20) and 155.0b2.
  • Test case from comment 15:
    • Firefox 156.0a1 (2026-08-20): Displays correctly on all scales.
    • Firefox 155.0b2: Displays correctly on most scales (100%, 125%, 150%, 166%, 200%), but fails to display properly at 133% scale.

Note that Firefox 156.0a1 (2026-08-20) was tested with both Nova on and off.

Do you think we should file a new issue for the 133% display failure on Firefox 155.0b2? Thank you!

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift] [qa-ver-needed-c156/b155] → [uplift] [qa-ver-done-c156/b155]
Flags: qe-verify+ → needinfo?(emilio)

That is odd, yeah, can you file a bug for that one?

Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: