[Webkit-unassigned] [Bug 234176] New: Incorrect handling of NaN inside calc() for top-level calculation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 14:42:00 PST 2021


            Bug ID: 234176
           Summary: Incorrect handling of NaN inside calc() for top-level
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: miketaylr at gmail.com

In https://drafts.csswg.org/css-values/#calc-type-checking, more specifically in https://drafts.csswg.org/css-values/#top-level-calculation, it states:

> If a top-level calculation (a math function not nested inside of another math function) would produce a value whose numeric part is NaN, it instead act as though the numeric part is +∞. 

Looking at https://wpt.fyi/results/css/css-values/calc-infinity-nan-computed.html?label=master&label=experimental&aligned&q=infinity-nan (source @ https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-infinity-nan-computed.html#L19), Safari Tech Preview 136 is resolving "calc(NaN * 1px)" to "0", rather than ~Inifinity, like it does for "calc(infinity * 1px)".

Not sure if the spec was changed after the implementation in https://bugs.webkit.org/show_bug.cgi?id=231044, but it looks like a bug right now.

(there are other WPT failures, but I haven't looked closely at them)

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211210/78df7300/attachment.htm>

More information about the webkit-unassigned mailing list