Closed Bug 1893127 Opened 7 months ago Closed 7 months ago

Firefox 125 CSS calculation issue

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 125
defect

Tracking

()

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

People

(Reporter: christian.josephi, Assigned: emilio)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(3 files)

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

Steps to reproduce:

Call https://www.cede.ch/en/music/?view=detail&branch_sub=0&branch=1&aid=18446451 and check the position of the buttons 'Add to shopping cart' and 'On the wish list' on a large screen (desktop). Also gradualy change the width of the browser window, to see the behaviour of the 2 buttons

Actual results:

Starting with version 125 the CSS calculation seems to have a problem. Thus the 2 buttons 'Add to shopping cart' and 'On the wish list' on large screens (desktops) are not getting displayed side by side but above each other (depending on the actual size of the browser window). When changing the width of the browser window, the 2 buttons begin to jump around, from side by side to above each other.

Expected results:

The 2 buttons 'Add to shopping cart' and 'On the wish list' should be displayed side by side consistently, also when changing the width of the browser window, down to the point where the layout changes for smaller screens. This is the behaviour in other browsers and in firefox up to and including version 124.

The Bugbug bot thinks this bug should belong to the 'Firefox::Messaging System' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Messaging System
Regressed by: 1881220
Component: Messaging System → Layout
Product: Firefox → Core

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

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Attached file Reduced test-case.

Hmm, so this is generally hard because due to floating precision as soon as we go back to pixels we can get different results at the end... If we do the math in fixed-point then that's also bad because a lot of features rely on using CSS pixels...

As a workaround the site could use round(down, 50% - ..., 1px) to avoid these shenanigans of course, but that's not great...

Flags: needinfo?(emilio)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Duplicate of this bug: 1893438

As a short term fix this seems acceptable. Mark the test for the
regressing bug as failing.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Duplicate of this bug: 1893787

Comment on attachment 9398998 [details]
Bug 1893127 - Back out bug 1881220 for causing worse regressions than the problem it was fixing. r=#layout,#style

Beta/Release Uplift Approval Request

  • User impact if declined: comment 0 and duplicates
  • 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): Reverts to previous behavior, while keeping the tests.
  • String changes made/needed: none
  • Is Android affected?: Yes
Attachment #9398998 - Flags: approval-mozilla-release?
Attachment #9398998 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d8e23e8fad18 Back out bug 1881220 for causing worse regressions than the problem it was fixing. r=layout-reviewers,firefox-style-system-reviewers,boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45944 for changes under testing/web-platform/tests
Backout by tszentpeteri@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/03b997590154 Backed out changeset d8e23e8fad18 for causing failures in calc-rounding-001.html. CLOSED TREE
Upstream PR was closed without merging
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8256dde05335 Back out bug 1881220 for causing worse regressions than the problem it was fixing. r=layout-reviewers,firefox-style-system-reviewers,boris
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/bacbb8f0dc66 calc-rounding-002.html passes in some platforms
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch

Comment on attachment 9398998 [details]
Bug 1893127 - Back out bug 1881220 for causing worse regressions than the problem it was fixing. r=#layout,#style

Approved for 126.0b7

Attachment #9398998 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triaged]

I managed to reproduce this issue on Firefox 126.0a1 (2024-04-11), under Windows 11, using the STR from Comment 0.
I confirm that the issue is no longer reproducible on Firefox 127.0a1 (2024-04-28), or on Firefox 126.0b7(treeherder build). Tests were performed on
Windows 11, macOS 10.15 and Ubuntu 22.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Comment on attachment 9398998 [details]
Bug 1893127 - Back out bug 1881220 for causing worse regressions than the problem it was fixing. r=#layout,#style

Rejecting release uplift request since we are in Fx126 RC week.
This will ride the train to release with Fx126.

Attachment #9398998 - Flags: approval-mozilla-release? → approval-mozilla-release-
Duplicate of this bug: 1895485
Duplicate of this bug: 1892314
Duplicate of this bug: 1893855
Component: Layout → CSS Parsing and Computation
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: