SVG getScreenCTM does not account for CSS transforms
Categories
(Core :: SVG, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: dojo, Assigned: violet.bugreport, NeedInfo)
References
Details
Attachments
(2 files)
| Reporter | ||
Updated•12 years ago
|
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Updated•11 years ago
|
Comment 8•10 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 10•7 years ago
|
||
| Assignee | ||
Comment 11•7 years ago
|
||
Robert, do you know what is the correct behavior of getCTM() for element inside a display:none?
For example:
<svg id="svg" width="300" height="300">
<g style="display:none">
<rect transform="scale(3,3)" id="rec" width="10" height="10"/>
</g>
</svg>
What should be the return of rec.getCTM()?
The spec says https://svgwg.org/svg2-draft/types.html#__svg__SVGGraphicsElement__getCTM:
If the current element is a non-rendered element, and the UA is not able to resolve the style of the element, then return null.
I'm not sure what the second half means.
FYI, our transform code heavily relies on the present of a frame, but display:none subtree has no frame. It'd be quite awkward if we need to return the CSS matrix for display:none.
Chrome return CSS matrix for element inside display:none subtree but itself not being display:none.
Comment 12•7 years ago
|
||
We've always basically given up with DOM methods in the face of display:none. bug 376027 covers trying to change that but it's rather hard given you can have a display:none container containing SVG content.
| Assignee | ||
Comment 13•7 years ago
|
||
We use nsSVGUtils::GetTransformMatrixInUserSpace to support
CSS transform in getCTM.
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
| bugherder | ||
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
| Comment hidden (obsolete) |
Updated•6 years ago
|
| Comment hidden (off-topic) |
| Comment hidden (obsolete) |
Comment 21•6 years ago
|
||
ok, raised a new bug https://bugzilla.mozilla.org/show_bug.cgi?id=1610093
Description
•