If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

SVG getScreenCTM ignores padding, border

UNCONFIRMED
Unassigned

Status

()

Core
SVG
UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: AnSeki.aff, Unassigned)

Tracking

32 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
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

3 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

3 years ago
OS: Windows XP → All
Hardware: x86 → All

Updated

3 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

3 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

3 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

3 years ago
Summary: SVG getScreenCTM ignores CSS transform (translate, rotate, scale, skewX/Y etc.), padding, border → SVG getScreenCTM ignores padding, border
You need to log in before you can comment on or make changes to this bug.