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

fserb has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [geometry] New DOMMatrix2DInit validating is confusing ==

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