-
Notifications
You must be signed in to change notification settings - Fork 141
Description
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 theis2D
slots be affected? - Related, when getting
CSSMatrixComponent.matrix
, what should itsis2D
slot be? Should the matrix be different depending onis2D
? - If the
DOMMatrix
is mutated so that itsis2D
slot becomes false, should theCSSMatrixComponent
'sis2D
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.