Re: [css-houdini-drafts] [css-typed-om] Does the is2D design allow for inconsistent interpretation of CSSTransformComponents?

Shoot, I'd like to re-open this. I was just doing the edits and suddenly remembered why I didn't go down this route - CSSMatrixComponent is Problematic.

CSSMatrixComponent is just a TypedOM wrapper around DOMMatrix, which I think is a reasonable design - there's no good reason to invent a new matrix look-alike class. But in DOMMatrix, the is2D flag is readonly - it tells you whether the matrix is currently describing a 2d or 3d operation, rather than *controlling* whether the matrix is 2d or 3d.

If I apply this resolution consistently, then I need to have CSSMatrixComponent.is2D, when true, somehow reflect down and cause the internal DOMMatrix to throw on operations/sets that would make it become 3d.  That's not possible right now, and there's probably not a good reason to add that functionality.

I now remember mulling over this, when I was earlier considering having the is2D design reflect what we've now resolved on, and couldn't figure out any reasonable way to make it work.

I'd rather not have one subclass act substantially differently than the other subclasses in this regard.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/610#issuecomment-364215211 using your GitHub account

Received on Thursday, 8 February 2018 19:05:11 UTC