SVG patternTransform translate uses wrong units
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: timwi, Assigned: longsonr)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(4 files)
2.25 KB,
image/png
|
Details | |
170 bytes,
image/png
|
Details | |
305 bytes,
image/svg+xml
|
Details | |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
dmeehan
:
approval-mozilla-release+
dmeehan
:
approval-mozilla-esr115+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Steps to reproduce:
Consider the following SVG code:
<svg viewBox='0 0 2 2' xmlns='http://www.w3.org/2000/svg'>
<defs>
<pattern id="r" patternTransform="translate(.5 .5)" patternUnits="userSpaceOnUse" width="2" height="2">
<path d="M0 0h1v1H0zM1 1h1v1H1z" />
</pattern>
</defs>
<rect x='0' y='0' width='2' height='2' fill='url(#r)' />
</svg>
Actual results:
See attached screenshot actual_rendering.png
. Firefox appears to interpret the “.5” in the patternTransform as a miniscule unit that amounts to just one pixel offset (see the thin black line along the top and left edge).
Expected results:
See attached screenshot expected_rendering.png
. Firefox is supposed to interpret the “.5” as a unit relative to the size of the pattern. This expected rendering is produced by both Chrome and Inkscape.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e05949a302a42cab9583e628b2b573b9490228a8&tochange=b5806e6bb8f78cb705c008b8b1a42dc4b56941b4
Updated•1 year ago
|
Comment 4•1 year ago
|
||
:longsonr, since you are the author of the regressor, bug 1193586, could you take a look?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Assignee | ||
Comment 6•1 year ago
|
||
Comment 7•1 year ago
|
||
Looks like a good candidate for the planned dot release, tracking for 115.
Comment 10•1 year ago
|
||
bugherder |
Assignee | ||
Comment 11•1 year ago
|
||
Comment on attachment 9342019 [details]
Bug 1840746 - SVG patternTransform translate uses wrong units r=emilio
Beta/Release Uplift Approval Request
- User impact if declined: incorrect patterns when patternTransform is used
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): reverts one line of code to what it was in Firefox 114
- String changes made/needed:
- Is Android affected?: Yes
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Comment on attachment 9342019 [details]
Bug 1840746 - SVG patternTransform translate uses wrong units r=emilio
Approved for 116.0b2
Comment 14•1 year ago
|
||
bugherder uplift |
Comment 15•1 year ago
|
||
Comment on attachment 9342019 [details]
Bug 1840746 - SVG patternTransform translate uses wrong units r=emilio
Approved for 115.0.2
Approved for 115.0.2esr
Comment 16•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 17•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 18•1 year ago
|
||
uplift |
Description
•