Closed
Bug 1073207
Opened 11 years ago
Closed 6 years ago
SVG getScreenCTM ignores padding, border
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla68
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: AnSeki.aff, Assigned: violet.bugreport)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140923175406
Steps to reproduce:
Got values by getScreenCTM in the SVG element that was styled CSS transform, padding and border.
http://jsfiddle.net/gRTcF/8/
http://jsfiddle.net/3v4e0Lnx/
http://jsfiddle.net/ehy1zkL6/
Actual results:
The returned values (x, y) are not computed offsets by those CSS properties.
Expected results:
For example, length of CSS border-width added to position is returned.
![]() |
Reporter | |
Comment 1•11 years ago
|
||
These may be related, getScreenCTM seems to ignore some CSS properties that changes position.
https://bugzilla.mozilla.org/show_bug.cgi?id=972041
https://bugzilla.mozilla.org/show_bug.cgi?id=850733
CSS properties below didn't make this problem:
- `margin`
- `position: absolute`, `left` and `top`
- `overflow: auto` (or `hidden`) of parent and scrolled SVG element
- negative margin
- `padding` of parent
![]() |
Reporter | |
Updated•11 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Updated•11 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Summary: SVG getScreenCTM ignores the length of offsets by CSS transform, padding, border → SVG getScreenCTM ignores the length of offsets by CSS padding, border
![]() |
Reporter | |
Comment 2•11 years ago
|
||
Not limited to `translate`. The `rotate`, `scale`, `skewX/Y` of SVG element also seems to make this problem occur.
http://jsfiddle.net/nsnwanLn/
http://jsfiddle.net/791o0xhq/
http://jsfiddle.net/0kef2rnm/
I don't check 3D properties yet. (e.g. perspective)
These are `transform` of SVG element. Not parent element.
![]() |
Reporter | |
Updated•11 years ago
|
Summary: SVG getScreenCTM ignores the length of offsets by CSS padding, border → SVG getScreenCTM ignores CSS transform (translate, rotate, scale, skewX/Y etc.), padding, border
Updated•11 years ago
|
Summary: SVG getScreenCTM ignores CSS transform (translate, rotate, scale, skewX/Y etc.), padding, border → SVG getScreenCTM ignores padding, border
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → violet.bugreport
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 3•6 years ago
|
||
Pushed by violet.bugreport@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0ebd471a1242
getScreenCTM should account for padding and border for outer svg r=longsonr
Comment 5•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in
before you can comment on or make changes to this bug.
Description
•