author violet <>
Sat, 20 Apr 2019 02:04:52 +0000
changeset 470272 4c5a5b50c951ff946b39c178b080762e63043111
permissions -rw-r--r--
Bug 1247218 - Should consider CSS transform when using non-scaling-stroke r=longsonr 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. Differential Revision:

    transform: translate(100px,200px) scale(1,2.5);
<svg style="width: 500px; height: 500px; border: 1px solid green;">
  <rect id="square" stroke="blue" vector-effect="non-scaling-stroke" stroke-width="6" x="50px" y="50px" width="50px" height="50px" fill="pink" />