[Gecko Bug 2013251] Relax CSSUnitValue numeric comparison tolerance#57767
Merged
moz-wptsync-bot merged 2 commits intomasterfrom Feb 13, 2026
Merged
[Gecko Bug 2013251] Relax CSSUnitValue numeric comparison tolerance#57767moz-wptsync-bot merged 2 commits intomasterfrom
moz-wptsync-bot merged 2 commits intomasterfrom
Conversation
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
wpt-pr-bot
approved these changes
Feb 13, 2026
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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