Poor SVG rendering with small viewBox
Categories
(Core :: SVG, defect, P3)
Tracking
()
People
(Reporter: marklmichael98, Assigned: nical)
References
(Regression)
Details
(Keywords: regression)
Attachments
(5 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
Open the attached test.svg file using Firefox and Chrome and Inkscape.
Actual results:
Chrome and Inkscape render the SVG as expected: The blue rectangle does not overlap with the opaque black border. On Firefox the blue rectangle overlaps with the border a lot.
Expected results:
Firefox should have rendered the SVG as expected (as in Chrome and Inkscape).
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 4•2 years ago
|
||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
:nical, since you are the author of the regressor, bug 1686654, could you take a look? Also, could you set the severity field?
For more information, please visit auto_nag documentation.
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
This looks like a precision issue. If I multiply the coordinates by 10 the error is much less pronounced and multiplied by 100 it is gone.
That would suggest that parts of the svg/blob code is working with nscoord where it should instead use floats.
Assignee | ||
Comment 7•2 years ago
|
||
I suspect that the precision loss from using nscoord happens in places like https://searchfox.org/mozilla-central/rev/b0e929cfaf3994cad2dd02afdac138083ee3fc84/layout/svg/SVGGeometryFrame.cpp#816
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
|
||
Under strong scales, going through the integer coordinate representation loses too much information. This patch tries to keep the same operations while sticking to floating point coordinates.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
The severity field is not set for this bug.
:TYLin, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Assignee | ||
Comment 11•2 years ago
|
||
Why the fuzziness is intermittent is beyond me, but the idea of the test is to stress preicsion issues with a scaling transform applied to an SVG rect so it is prone to result in small difference on the antialiased edges.
Comment 12•2 years ago
|
||
Assignee | ||
Comment 13•2 years ago
|
||
Comment on attachment 9298834 [details]
Bug 1792313 - Add fuziness to an intermittent reftest. r=#gfx-reviewers
Beta/Release Uplift Approval Request
- User impact if declined: None. It will only prevent a test from intermittently failing. No need to uplift if we don't mind the intermittent failure on beta.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- 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): It's only a test change so there is no impact to the user.
- String changes made/needed:
- Is Android affected?: Yes
Comment 14•2 years ago
|
||
Might have been better simply to have turned off antialiasing via shape-rendering="crispEdges" in the testcase and the reference.
Comment 15•2 years ago
|
||
bugherder |
Comment 16•2 years ago
|
||
Comment on attachment 9298834 [details]
Bug 1792313 - Add fuziness to an intermittent reftest. r=#gfx-reviewers
Approved for 107.0b3.
Comment 17•2 years ago
|
||
bugherder uplift |
Comment 18•2 years ago
•
|
||
For posterity, the push to autoland in Comment 10 landed in central during 107 nightly
Bugherder didn't change the 107 status to fixed
https://hg.mozilla.org/mozilla-central/rev/e97d9856e8806f3cd8fb6ec824b8340578192a31
Updated•2 years ago
|
Updated•2 years ago
|
Description
•