W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > May 2017

Re: [fxtf-drafts] [geometry] stringifier behavior doesn't seem to match implementations

From: Simon Pieters via GitHub <sysbot+gh@w3.org>
Date: Thu, 04 May 2017 23:15:15 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issue_comment.created-299334598-1493939713-sysbot+gh@w3.org>
The patch has this change to a test
```diff
-  assert_equals(matrix2d.toString(), "matrix(1, 2, 3, 3.1, 2, 1)");
+  assert_equals(matrix2d.toString(), "matrix(1.000000, 2.000000, 3.000000, 3.100000, 2.000000, 1.000000)");
```

It is not clear to me that this is a desirable result.

https://html.spec.whatwg.org/multipage/infrastructure.html#best-representation-of-the-number-as-a-floating-point-number uses JS's `ToString`, which doesn't produce trailing zeros. But can still represent double precision, right?

Related is how to serialize non-finite values. `NaN` and `Infinity` are invalid CSS keywords, so it wouldn't successfully parse again...

-- 
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/120#issuecomment-299334598 using your GitHub account
Received on Thursday, 4 May 2017 23:15:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 November 2018 00:45:58 UTC