[Webkit-unassigned] [Bug 218880] New: Serialize CSS <number> values with rounding, limited decimal precision, and no exponents per-spec

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 12 18:13:54 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=218880

            Bug ID: 218880
           Summary: Serialize CSS <number> values with rounding, limited
                    decimal precision, and no exponents per-spec
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: twilco.o at protonmail.com

https://drafts.csswg.org/cssom/#serialize-a-css-component-value

> A base-ten number using digits 0-9 (U+0030 to U+0039) in the shortest form possible, using "." to separate decimals (if any), rounding the value if necessary to not produce more than 6 decimals, preceded by "-" (U+002D) if it is negative.
> Note: scientific notation is not used.

Currently, WebKit serializes <number>s with more than 6 decimals, and uses exponents (scientific notation).  For example:
  *  [1] (PASS ... "hue-rotate(calc(8594.366926962348deg))")
  *  [2] (PASS ... should serialize as 'matrix(6.123233995736766e-17, 1, -1, 6.123233995736766e-17, 0, 0)')
  *  [3] (PASS ... fontSize is "9.600000381469727px")

Comparing with Chromium and Gecko:

[1] WebKit:   8594.366926962348deg
[1] Chromium: 8594.37deg        
[1] Gecko:    8594.37deg         

[2] WebKit:   matrix(6.123233995736766e-17, 1, -1, 6.123233995736766e-17, 0, 0)
[2] Chromium: matrix(6.12323e-17, 1, -1, 6.12323e-17, 0, 0)
[2] Gecko:    matrix(0, 1, -1, 0, 0, 0)

[3] WebKit:   9.600000381469727px
[3] Chromium: 9.6px
[3] Gecko:    9.6px

[1]: https://github.com/WebKit/webkit/blob/817c46e152af795d735678386db68805d0aa505e/LayoutTests/fast/css/calc-with-angle-time-frequency-expected.txt#L10
[2]: https://github.com/WebKit/webkit/blob/8b173fd921c96eedcbceab8d1fec14d12afaab8b/LayoutTests/imported/w3c/web-platform-tests/css/css-values/minmax-angle-serialize-expected.txt
[3]: https://github.com/WebKit/webkit/blob/817c46e152af795d735678386db68805d0aa505e/LayoutTests/css3/calc/font-size-fractional-expected.txt#L7

-- 
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/20201113/711d16a6/attachment.htm>


More information about the webkit-unassigned mailing list