Closed
Bug 1247218
Opened 9 years ago
Closed 6 years ago
svg: "vector-effect: non-scaling stroke" has no effect within a <g> that has a css transform
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla68
People
(Reporter: ben.jeffery, Assigned: violet.bugreport)
References
Details
(Keywords: testcase)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
Steps to reproduce:
See http://codepen.io/anon/pen/vLvOpr with an SVG with two lines, both with 'non-scaling-stroke'. Each line is in a <g> with the same scale transform, one set by the "transform" attribute, the other by the "style" attribute.
Actual results:
The line is 1px wide within a <g> that has the "transform" attribute, but the second line is 10px where the <g> has the transform set via a "style" attribute.
Expected results:
Both lines 1px wide.
Comment 1•9 years ago
|
||
User agent: Mozilla/5.0(k 11;Linux k86_64) Apple web kit/537.36 (K
HTML, like Gecko) Chrome/47.0.2526.106
Solution
Look for the transform attribute as well as style attribute. Within the line, it is 1px which needs to have a transform attribute. Both lines in the HTML code needs to be 1px wide.
Assignee | ||
Updated•6 years ago
|
Status: UNCONFIRMED → NEW
status-firefox67:
--- → affected
Ever confirmed: true
Version: 43 Branch → Trunk
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → violet.bugreport
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•6 years ago
|
||
We remove initial x/y offset for nsSVGUtils::GetTransformMatrixInUserSpace
so that it can be used in not-nondisplay context. Previously it was only
used in nondisplay context, where x/y offset is always 0.
Then we use this utility to get the transform matrix to judge whether we need
special care for non-scaling-stroke. The old matrix doesn't account for CSS
transform.
Pushed by violet.bugreport@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4c5a5b50c951
Should consider CSS transform when using non-scaling-stroke r=longsonr
Comment 5•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•