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

[fxtf-drafts] [geometry] DOMMatrix should not depend on the CSS parser

From: Elliott Sprehn via GitHub <sysbot+gh@w3.org>
Date: Tue, 28 Mar 2017 23:40:04 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-217724067-1490744401-sysbot+gh@w3.org>
esprehn has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [geometry] DOMMatrix should not depend on the CSS parser ==
I do not think the low level geometry types should depend on having a CSS tokenizer and parser available.

The spec does not provide affordances to parse any other CSS syntax, for example `rect()` into DOMRect, and parsing CSS is better handled by the Typed OM spec which uses an operation list to represent transforms instead of a matrix (which is a better fit for CSS anyway).

If authors wish to create a DOMMatrix from a list of steps they can do:
```js
  new DOMMatrix()
     .translateSelf(...)
     .scaleSelf(...)
     ...
```
which will also be faster since it doesn't require parsing all of the numbers back out of a string.

@shans @tabatkins @bfgeek 

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/122 using your GitHub account
Received on Tuesday, 28 March 2017 23:40:10 UTC

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