- From: Sam Atkins via GitHub <noreply@w3.org>
- Date: Tue, 16 Sep 2025 13:22:10 +0000
- To: public-houdini-archive@w3.org
AtkinsSJ has just created a new issue for https://github.com/w3c/css-houdini-drafts: == [css-typed-om] CSSMatrixComponent handles `is2D` inconsistently == `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](https://drafts.css-houdini.org/css-typed-om-1/#dom-cssmatrixcomponent-cssmatrixcomponent) 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`](https://drafts.css-houdini.org/css-typed-om-1/#serialize-a-cssmatrixcomponent) says this, which means it uses its held `DOMMatrix`'s `is2D` flag and ignores its own: > 1. Return the [serialization](https://www.w3.org/TR/geometry-1/#dommatrixreadonly-stringification-behavior) of this’s [matrix](https://drafts.css-houdini.org/css-typed-om-1/#dom-cssmatrixcomponent-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? - 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. Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1155 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 16 September 2025 13:22:11 UTC