- From: Nikos Andronikos via GitHub <sysbot+gh@w3.org>
- Date: Thu, 23 Feb 2017 02:35:43 +0000
- To: public-svg-issues@w3.org
nikosandronikos has just labeled an issue for https://github.com/w3c/svgwg as "SVG Core": == getScreenCTM (and friends?) results for elements that are not in the rendering tree? == >From the way the algorithm for getScreenCTM [1] is currently writted, it could be interpreted such that whether the element is in the rendering tree or not is not relevant, and the CTM would be computed based ("solely") on the DOM structure. The main reason for asking is really because of strong connection to interfaces such as getClientRects [2] (a bond the spec even makes in a note), which will return an empty result in such cases. If the current text is intentional, maybe a slight addition can be made to spell this out? (Much like how the section on bounding boxes [3] calls this out I suppose.) I did a quick test (Gecko and Blink/Chromium 57), non-rendering tree elements seem to compute an "accurate" CTM as long as they don't also would've taken part in CSS layout. (So a `<rect>` with `display:none` gets a proper CTM, while an outermost `<svg>` does not. The latter also gives different result between the two UAs tested.) [1] https://svgwg.org/svg2-draft/types.html#__svg__SVGGraphicsElement__getScreenCTM [2] https://drafts.csswg.org/cssom-view/#dom-element-getclientrects [3] https://svgwg.org/svg2-draft/coords.html#BoundingBoxes See https://github.com/w3c/svgwg/issues/307
Received on Thursday, 23 February 2017 02:35:50 UTC