Math function 'calc()' should allow infinity and NaN
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: seokho, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Expected results:
According to the new CSS specification [1], CSS calc() math function should allow infinity and NaN values by 'infinity', '-infinity', 'NaN' keywords or expressions that could be evaluated into infinity or NaN such as 'calc(1/0)'.
[1] https://drafts.csswg.org/css-values-4/#calc-type-checking
Reporter | ||
Comment 1•3 years ago
|
||
And perhaps this issue related in https://bugzilla.mozilla.org/show_bug.cgi?id=css-values-4
Comment 2•3 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•1 year ago
|
||
Fix some tests to:
- Not assume
double
precision. - Account for recent working group resolution with regards to NaN: https://github.com/w3c/csswg-drafts/issues/7067#issuecomment-1111211295
Not sure I caught all, but normalizing to 0 was already our existing
behavior. This feature needs more work before it can be enabled more
generally, so make it nightly-only, for now.
Also, it's unclear per spec what the serialization for infinity*1s or so
should be. Right now we serialize to <very-big-number>s, which seems
reasonable, but some tests (but not others!) expect different behavior.
I left those untouched for now.
Updated•1 year ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf0c0ff13cc1 Add basic support for nan / infinity in calc(). r=boris
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35502 for changes under testing/web-platform/tests
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/08ec785b9923 Remove some property_database.js tests which are now valid.
Backout by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4a6a73188de Backed out 5 changesets (bug 1682444, bug 1774589) for causing wpt failures on acos-asin-atan-atan2-serialize.html. CLOSED TREE
Comment 8•1 year ago
•
|
||
Backed out 5 changesets (Bug 1682444, Bug 1774589) for causing wpt failures on acos-asin-atan-atan2-serialize.html.
Backout link
Push with failures --> 1st push <--> push with fix
Failure Log wpt6 1st push <--> wpt6 push with fix
Backout by mlaza@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/f11d32415e9b Backed out 5 changesets (bug 1682444, bug 1774589) for causing wpt failures on acos-asin-atan-atan2-serialize.html. CLOSED TREE
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a71f1814b2d7 Add basic support for nan / infinity in calc(). r=boris
Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•1 year ago
|
Comment 13•11 months ago
|
||
We are tracking the docs additions for this along with related CSS trig functions docs in https://github.com/mdn/content/issues/19832
Updated•11 months ago
|
Description
•