CSSMatrixComponent has an is2D slot like any other CSSTransformComponent. Its held DOMMatrix also has an is2D slot, and these don't always match up. For example, the CSSMatrixComponent(matrix, options) constructor lets the user pass in their own is2D flag, which overrides CSSMatrixComponent's, but doesn't change its internal DOMMatrix's one.
A bug is that serialize a CSSMatrixComponent says this, which means it uses its held DOMMatrix's is2D flag and ignores its own:
- Return the serialization of this’s matrix internal slot.
Some other things that might not be bugs but are confusing, are:
- When setting
CSSMatrixComponent.matrix, should the is2D slots be affected?
- Related, when getting
CSSMatrixComponent.matrix, what should its is2D slot be? Should the matrix be different depending on is2D?
- If the
DOMMatrix is mutated so that its is2D slot becomes false, should the CSSMatrixComponent's is2D be updated?
In my opinion, CSSMatrixComponent shouldn't have an is2D of its own, but should just reflect the is2D of its contained DOMMatrix. The constructor above could then create a copy of the DOMMatrix if it needs to mutate is2D on it.
CSSMatrixComponenthas anis2Dslot like any otherCSSTransformComponent. Its heldDOMMatrixalso has anis2Dslot, and these don't always match up. For example, theCSSMatrixComponent(matrix, options)constructor lets the user pass in their ownis2Dflag, which overridesCSSMatrixComponent's, but doesn't change its internalDOMMatrix's one.A bug is that serialize a
CSSMatrixComponentsays this, which means it uses its heldDOMMatrix'sis2Dflag and ignores its own:Some other things that might not be bugs but are confusing, are:
CSSMatrixComponent.matrix, should theis2Dslots be affected?CSSMatrixComponent.matrix, what should itsis2Dslot be? Should the matrix be different depending onis2D?DOMMatrixis mutated so that itsis2Dslot becomes false, should theCSSMatrixComponent'sis2Dbe updated?In my opinion,
CSSMatrixComponentshouldn't have anis2Dof its own, but should just reflect theis2Dof its containedDOMMatrix. The constructor above could then create a copy of theDOMMatrixif it needs to mutateis2Don it.