You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
elementMatrix throws 'is2D ... 3d matrix' in four margin-layout and comparison tests since #6795 #6847
TypeError: Failed to execute 'multiply' on 'DOMMatrixReadOnly': The is2D member is set to true but the input matrix is a 3d matrix.
at elementMatrix (runtime/element-axes.js:93:22)
at clipEntries (runtime/geometry.js:1560:22)
at clipWalk (runtime/geometry.js:1510:3)
at headerCuts (runtime/geometry.js:451:10) # or paintClips (geometry.js:1360) → target-paint-geometry.js → margin-bars.js
at headerLevels (runtime/css-anchors.js:597:10)
at layoutMountedRows (annotation-overlay/margin-layout.js:2227:17)
Diagnosis so far: git blame attributes all of elementMatrix in browser/runtime/element-axes.js to #6795 (7c94421ca, "Map an element's pixels to the viewport through every transform"). That commit falls between 10ac9da49, whose push run 45104895190 passed these tests, and 49007d755. At line 93, outer.multiply(own) throws when outer is a 2D matrix and own is 3D. That fits line 89, which builds outer from an SVG element's getScreenCTM 6-tuple, but nobody has checked yet which branch builds the 2D matrix here. #4227 hit the same kind of exception in an earlier version of the motion code.
#6852 fixes the cause. All four tests fail on main and pass on the branch. Review, CI and landing are up to the PR's review and landing workflows.
The 2D matrix in line 93 isn't from SVG's getScreenCTM: in every captured failure outer was the identity. The bad operand was own, which was all NaN. It comes from elements the browser computes no style for: a detached <lf-tabs> in the comparison tests, and a connected .lf-reply-continuity overlay inside versions/v1.html, a document with no window, in the application-boundary tests. Every computed property on these elements reads "". ownTransform treated rotate: "" as a turn of NaN degrees, and Chrome's multiply rejects a NaN matrix still flagged is2D. The fix returns no transform when the computed display is empty, so an element with no box adds nothing to the map.
Activity
leaf-agent commentedon Nov 23, 2026
#6852 fixes the cause. All four tests fail on
mainand pass on the branch. Review, CI and landing are up to the PR's review and landing workflows.The 2D matrix in line 93 isn't from SVG's
getScreenCTM: in every captured failureouterwas the identity. The bad operand wasown, which was all NaN. It comes from elements the browser computes no style for: a detached<lf-tabs>in the comparison tests, and a connected.lf-reply-continuityoverlay insideversions/v1.html, a document with no window, in the application-boundary tests. Every computed property on these elements reads"".ownTransformtreatedrotate: ""as a turn of NaN degrees, and Chrome'smultiplyrejects a NaN matrix still flaggedis2D. The fix returns no transform when the computeddisplayis empty, so an element with no box adds nothing to the map.