Skip to content

[Gecko Bug 2013251] Relax CSSUnitValue numeric comparison tolerance#57767

Merged
moz-wptsync-bot merged 2 commits intomasterfrom
gecko/2013251-1
Feb 13, 2026
Merged

[Gecko Bug 2013251] Relax CSSUnitValue numeric comparison tolerance#57767
moz-wptsync-bot merged 2 commits intomasterfrom
gecko/2013251-1

Conversation

@moz-wptsync-bot
Copy link
Collaborator

Relax the numeric comparison tolerance for CSSUnitValue values.

Different style engines retain different floating-point precision. A tolerance
of 1e-6 is too strict for some engines that use float-based CSS numeric
representations.

With the existing tolerance, a test comparing the expected value 37.7952755
against results such as 37.79527559055118 and 37.7952766418457 can fail
despite all values being valid.

Increase the tolerance to 1e-5 to avoid spurious test failures.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2013251
gecko-commit: 705940ab3217409f8c2c49a5c9a5c09f898037b4
gecko-reviewers: emilio

Relax the numeric comparison tolerance for CSSUnitValue values.

Different style engines retain different floating-point precision. A tolerance
of 1e-6 is too strict for some engines that use float-based CSS numeric
representations.

With the existing tolerance, a test comparing the expected value 37.7952755
against results such as 37.79527559055118 and 37.7952766418457 can fail
despite all values being valid.

Increase the tolerance to 1e-5 to avoid spurious test failures.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2013251
gecko-commit: 705940ab3217409f8c2c49a5c9a5c09f898037b4
gecko-reviewers: emilio
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

assert_style_value_equals() does not take a description argument, yet some
call sites were passing one. The extra argument was ignored and inconsistent
with the helper’s signature.

Remove the unsupported parameter from those callers to align usage with the
helper definition.

No functional change intended.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2013251
gecko-commit: 49f349ef61fab2ab50f0ba69359b81e90cb7cfac
gecko-reviewers: emilio
@moz-wptsync-bot moz-wptsync-bot merged commit eadb038 into master Feb 13, 2026
24 checks passed
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/2013251-1 branch February 13, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants