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

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

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Wed, 10 May 2017 21:18:07 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issue_comment.created-300615473-1494451086-sysbot+gh@w3.org>
Also, so it doesn't get forgotten: The main substance of this issue still needs to be resolved.  

When you stringify a matrix to CSS notation, do you follow the "6-decimals & no scientific notation rule" from CSSOM, or do you maintain full double precision, or what?  Currently, Firefox and Chrome seem to use 6-digit precision (which isn't the same as 6-decimals) with scientific notation:

```js
m = new DOMMatrix();
m.a = 1/3;
m.b = 1/300000;
m.c = 100000 + (1/3);
m.d = Number.MAX_SAFE_INTEGER;
"" + m;
// Chrome 58 & Firefox 54 both return: 
// "matrix(0.333333, 3.33333e-06, 100000, 9.0072e+15, 0, 0)"
```

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/120#issuecomment-300615473 using your GitHub account
Received on Wednesday, 10 May 2017 21:18:15 UTC

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