Repository navigation
Description
Could the CSS Working Group consider requesting a W3C TAG design review of CSSOM View Level 1 §11.1, GeometryUtils? The proposed scope is the four GeometryUtils methods: getBoxQuads(), convertQuadFromNode(), convertRectFromNode(), and convertPointFromNode(), including how they apply to CSSPseudoElement.
These methods let tools such as visual editors and inspection overlays obtain the corners of transformed CSS boxes and map geometry between DOM coordinate spaces. See the explainer and examples and the CSSOM View web-platform-tests.
Examples and polyfill:
- Web Component Designer uses quad geometry for visual editing overlays.
- Project VisBug 2 uses quad geometry for transform-aware inspection and editing.
- Philip Rogers’s HTML-in-Canvas nested sparkles example uses
convertRectFromNode()when available to position nested drawable elements in canvas coordinates. - layout2vector uses
getBoxQuads()to preserve transformed geometry when exporting DOM content. - The GeometryUtils polyfill provides a JavaScript fallback.
- Ressac uses
getBoxQuads()when available to map coordinates through transformed iframes. - Firefox DevTools uses
getBoxQuads()for Inspector overlays. Patrick Brosset's developer feedback describes why it helps with wrapped text and multicolumn layouts. - Playwright's Firefox backend uses
getBoxQuads()to retrieve element geometry relative to the main document.
Browser automation use case. The Browser Testing and Tools Working Group discussed content quads at TPAC, and James Graham raised the need for a standardized DOM API in CSSWG #10537. WebDriver BiDi issue #787 asks for content quads for transformed elements. Playwright issue #32577 documents the concrete need to click accurately inside transformed elements when using BiDi.
Implementation status:
- Blink: The implementation landed behind experimental runtime flags and is in shipping preparation.
- Firefox (Gecko): Gecko already implements
getBoxQuads()and theconvert*FromNode()methods. Web exposure is behind preferences. Firefox tracks cross-origin iframe behavior and coordinate handling across processes under Fission as open work for release enablement. - WebKit: The implementation issue and implementation PR are open.
- Ladybird: There is an experimental implementation in my Ladybird fork, and Elytra carries a GeometryUtils patch. The upstream Ladybird issue remains open.
Question for implementers: Is the current specification complete and precise enough for wider review? Are there gaps or mismatches between the text and your implementation that the group should resolve first? Feedback on fragmented boxes, transformed coordinates, and pseudo-elements would be especially helpful.
Once implementers have had a chance to weigh in, could the chairs record whether the group agrees to request a TAG review scoped to §11.1?
Activity