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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox67 --- wontfix
firefox68 --- fixed

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.
Keywords: testcase
Product: Firefox → Core
Component: Untriaged → SVG
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 43 Branch → Trunk
Assignee: nobody → violet.bugreport
Status: NEW → ASSIGNED

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
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1883285
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: