Serialize NaN and infinity numbers
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: canadahonk, Assigned: canadahonk)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
<number>
values like NaN
and infinity
(and -infinity
) should be serialized properly as per spec, see WPT tests for examples. opacity: number
and transform: scale(number)
can be used as number examples. There are no WPT tests just for this, they should be added (something like calc-infinity-nan-serialize-number.html
, see similar existing tests).
Some current existing WPT tests show this:
- https://wpt.fyi/results/css/css-values/exp-log-serialize.html (3rd and 4th last)
- https://wpt.fyi/results/css/css-values/sin-cos-tan-serialize.html (the last FF failing set)
- Potentially more random/uncaught subtests, should retest all css-values WPTs
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Changed scope of this bug to just numbers as our existing NaN/inf util funcs are for floats and integers are more complex and require more investigation into expected/spec behavior with NaN/inf.
Assignee | ||
Comment 2•2 years ago
|
||
Added NaN/inf serialization of <number> and changed calc() code to not
remove NaN/infinity in code using it.
This change is unfortunately imperfect as some things using <number>
still refuse to serialize NaN/infinity for some reason (scale()?), but
this bug/patch is just for <number> so leaving that out of scope for this.
Also added new WPT test file for number NaN/inf serialization based
on existing serialization tests (all pass already!).
5 other WPT subtests now newly pass.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Comment 9•2 years ago
|
||
Backed out for causing multiple failures
Push with failures -R5
Push with failure - mochitest
Push with failure - C
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Changed patch to WIP as this broke more (reftests) than first seemed due to some things not expecting NaN/inf values.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
(In reply to CanadaHonk [:canadahonk] from comment #11)
Changed patch to WIP as this broke more (reftests) than first seemed due to some things not expecting NaN/inf values.
Looks like it changed back from WIP. :) Is this good to re-land?
Assignee | ||
Comment 13•2 years ago
|
||
Sorry for delay, was refraining a bit due to the "troubles" from this. Landing again :)
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
bugherder |
Comment 17•2 years ago
|
||
The patch landed in nightly and beta is affected.
:canadahonk, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox115
towontfix
.
For more information, please visit BugBot documentation.
Comment 18•2 years ago
|
||
Not worth uplifting; this can ride the trains as normal.
Comment 19•2 years ago
|
||
(In reply to CanadaHonk [:canadahonk] from comment #0)
Some current existing WPT tests show this:
- https://wpt.fyi/results/css/css-values/exp-log-serialize.html (3rd and 4th last)
Looks like these are now fixed. http://wpt.live/css/css-values/exp-log-serialize.html now only shows 2 failures, the very last 2, which fail in the same way among all browsers I think.
- https://wpt.fyi/results/css/css-values/sin-cos-tan-serialize.html (the last FF failing set)
I don't think these ones ended up being fixed here. We pass 52/68 test in this WPT (failing 16), both before and after this patch. It looks like bug 1834361 covers this part --> adding that as a dependency, since it seems it'll build on top of the work here.
Comment 20•2 years ago
|
||
(Thanks for the fix, BTW! :) )
Description
•