Closed Bug 1841638 Opened 1 year ago Closed 1 year ago

scale() does not serialize single NaN value correctly

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: canadahonk, Assigned: canadahonk)

References

Details

Attachments

(1 file)

Serializes as scale(calc(NaN), calc(NaN)) instead of scale(calc(NaN)) (repeated values should not be used). This issue may also pop up in (many) other places as x == y is not true if both values are NaN (due to IEEE 754 floating point spec).

WPT tests:
See end of subtests here failing with incorrect value scale(calc(NaN), calc(NaN)):

Added custom implementation of PartialEq for Numbers to also check if
they are both NaN values.

WPT tests not specifically for this but incorrect serialization of
expected results:

15 WPT subtests now newly pass :tada:

Assignee: nobody → oj
Status: NEW → ASSIGNED
Pushed by oj@oojmed.com: https://hg.mozilla.org/integration/autoland/rev/e3f62ea4e593 Fix scale() single NaN value serialization r=emilio
Severity: -- → S3
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
No longer blocks: 1856158
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: