Closed Bug 1820875 Opened 2 years ago Closed 2 years ago

NaN and infinity times are not serialized or parsed correctly

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: canadahonk, Assigned: canadahonk)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Times like NaN and infinity (and -infinity) should be serialized properly as per spec, see WPT tests for examples. Additionally, they are not parsed due to some parse-time clamping internal limitations with time values.

WPT test: https://wpt.fyi/results/css/css-values/calc-infinity-nan-serialize-time.html

Summary: NaN and infinity times are not serialized or calculated correctly → NaN and infinity times are not serialized or parsed correctly

Times like NaN and infinity are now parsed and serialized correctly.

Also added a new WPT test to cover a missing edge case:
calc(1<unit> * NaN) -> calc(NaN * 1<canonical_unit>)

The very similar angle tests do this already for angle's units.

Severity: -- → S3
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d47988b4ad04 Parse and serialize NaN and infinity times correctly r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38882 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: