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

[fxtf-drafts] [geometry] New DOMMatrix2DInit validating is confusing

From: Fernando Serboncini via GitHub <sysbot+gh@w3.org>
Date: Thu, 31 Aug 2017 19:53:46 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-254449125-1504209218-sysbot+gh@w3.org>
fserb has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [geometry] New DOMMatrix2DInit validating is confusing ==
https://drafts.fxtf.org/geometry/#dommatrixinit-dictionary
https://github.com/w3c/fxtf-drafts/issues/210
https://github.com/w3c/fxtf-drafts/pull/211

Is there a reason for us not having a fromMatrix(DOMMatrix2dInit other) on the spec too? Given that we must validate matrix on setTransform (for canvas2D), we need to be able to create those matrices anyway. 

Also, at least on Chrome's implementation, the new validate and fixup as suggested on the pull request is messy.
We can't make a generic validate function for both of them, which means that both variants (DOMMatrix2DInit and DOMMatrixInit) have to be implemented independently. Which means that "ignore3D" doesn't solve any implementation problem, but adds more complexity to the spec and weird code duplication.

I'd suggest we move to a validate and fixup that does: validate and fixup for DOMMatrix2DInit. And validate and fixup for DOMMatrixInit that starts with something like "all the DOMMatrix2DInit validation plus...". I'll try a spec change tomorrow for that, but please let me know what you think.

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/217 using your GitHub account
Received on Thursday, 31 August 2017 19:53:43 UTC

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