getBoundingClientRect() doesn't count css transform on SVG element
Categories
(Core :: SVG, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: violet.bugreport, Assigned: violet.bugreport)
References
Details
Attachments
(2 files, 1 obsolete file)
When an SVG element is applied CSS transform, its getBoundingClientRect()
should reflect the CSS transform instead of returning the original value.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
We should use nsLayoutUtils::GetTransformToAncestor instead of
nsSVGUtils::GetUserToCanvasTM to get the transform matrix. Because the former
will also take CSS transform into account while the later won't.
Pushed by violet.bugreport@gmail.com: https://hg.mozilla.org/integration/autoland/rev/253e90f0ccf3 Should take CSS transform into account when calculating getBoundingClientRect() r=longsonr
Comment 3•5 years ago
|
||
Does this mean that nsSVGUtils::GetUserToCanvasTM is now dead code?
Assignee | ||
Comment 4•5 years ago
|
||
Yes. And it won't have future use any more, since it fails to include CSS transform. We should probably just remove it.
Comment 6•5 years ago
|
||
Backed out for mochitest failures on test_bounds.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/1c0ed04569945302bf7d99ca5c8787623adfbbb6
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=238665003&repo=autoland&lineNumber=1660
Pushed by violet.bugreport@gmail.com: https://hg.mozilla.org/integration/autoland/rev/28eb58dd6af8 Should take CSS transform into account when calculating getBoundingClientRect() r=longsonr
Comment 8•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Comment hidden (obsolete) |
Updated•5 years ago
|
Description
•