Closed Bug 1792313 Opened 2 years ago Closed 2 years ago

Poor SVG rendering with small viewBox

Categories

(Core :: SVG, defect, P3)

Firefox 106
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- fixed
firefox108 --- fixed

People

(Reporter: marklmichael98, Assigned: nical)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Attached image test.svg

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).

Attached image Firefox's result
Attached image Chrome's result

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.

Component: Untriaged → SVG
Product: Firefox → Core

: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.

Flags: needinfo?(nical.bugzilla)
Summary: Poor SVG rendering with small viewport → Poor SVG rendering with small viewBox

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.

Flags: needinfo?(nical.bugzilla)

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.

Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Attachment #9297409 - Attachment description: Bug 1792313 - Avoid using nscoord for intermediate computation with SVG rectangles. r=jrmuizel,tnikkel → cBug 1792313 - Avoid using nscoord for intermediate computation with SVG rectangles. r=jrmuizel,tnikkel

The severity field is not set for this bug.
:TYLin, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(aethanyc)
Severity: -- → S3
Flags: needinfo?(aethanyc)
Priority: -- → P3
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e97d9856e880 cBug 1792313 - Avoid using nscoord for intermediate computation with SVG rectangles. r=tnikkel
Regressions: 1794437

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.

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/efd4a567d0dc Add fuziness to an intermittent reftest. r=gfx-reviewers,jnicol

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
Attachment #9298834 - Flags: approval-mozilla-beta?

Might have been better simply to have turned off antialiasing via shape-rendering="crispEdges" in the testcase and the reference.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

Comment on attachment 9298834 [details]
Bug 1792313 - Add fuziness to an intermittent reftest. r=#gfx-reviewers

Approved for 107.0b3.

Attachment #9298834 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

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

Duplicate of this bug: 1780191
No longer duplicate of this bug: 1780191
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: