Open Bug 2082801 Opened 1 month ago Updated 23 days ago

SVG dashed stroke loses definition and renders as a blurry wash at extreme viewBox zoom, not reproducible in Chrome/Edge (ChooseScale)

Categories

(Core :: SVG, defect)

Firefox 158
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mizery01, Unassigned, NeedInfo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0

Steps to reproduce

  1. Open the attached file firefox-svg-blur-repro.html in Firefox. It draws a single dashed circle
    (radius r, stroke-width = r0.006, stroke-dasharray = "r0.03 r*0.04" — the exact ratios used by a
    real orbital-boundary ring in a production app) inside an SVG whose viewBox is set so the viewport is
    about 0.38x the circle's own radius (i.e. zoomed in close enough that the dashed stroke fills a large
    part of the screen - this ratio matches a real-world case that showed the issue).
  2. Use the "Zoom in further" buttons on the page to shrink the viewBox by x0.5 and x0.25 relative to the
    circle, simulating deeper zoom.
  3. Compare the rendering of the dashed stroke at each zoom step to the same page opened in Chrome or Edge.

A second, independent way to see the same symptom: open the file attached to bug 2082794
(firefox-svg-text-bug-repro.html), specifically the "Case B" panel (viewBox scaled x100000 relative to
Case A, same reference circle in both panels). Compare the crispness of the small reference circle's edge
in Case A vs Case B.

Actual results

In Firefox, at the zoom levels described above, the dashed circle's stroke loses all definition: individual
dashes are no longer distinguishable, edges are soft/anti-aliased into a blur, and at extreme zoom the whole
ring reads as a smeared, washed-out band rather than a crisp dashed line.

The same artifact is visible, more subtly, on a plain (non-dashed) reference circle: in the file attached to
bug 2082794, the small reference circle in "Case B" (viewBox scaled x100000) has noticeably softer edges than
the identical circle in "Case A" (normal viewBox), even though both circles are drawn with the exact same
relative proportions.

Confirmed NOT reproducible in Chrome, Edge, or Opera at the same or deeper zoom levels - the dashed stroke and
circle edges stay crisp regardless of how extreme the zoom factor is.

Unlike the text-painting bug in bug 2082794 (which only appears starting in Firefox 158.0), this blur is
already present in Firefox 157.0.1 - so it predates that regression and is likely a separate, longer-standing
issue, though possibly related at the root: both symptoms only occur in Firefox, both only appear once the
SVG's internal viewBox-to-viewport scale factor becomes extreme, and both involve a mismatch between an
element's "local" (pre-transform) numeric values and how Firefox ends up painting it (not painting it at all
for text; painting it with degraded precision for strokes/edges). It's possible both are downstream of the
same underlying rendering-pipeline behavior at extreme scale factors - flagging that possibility here in case
it helps triage, without assuming it as fact.

  • Reproducible in Firefox 157.0.1 AND 158.0 (unlike bug 2082794, which only affects 158.0+) - this appears to
    be a separate, pre-existing issue, not part of the 158.0 regression.
  • Confirmed NOT reproducible in Chrome, Edge, or Opera.
  • Possibly related to bug 2082794 (filed moments ago) - both only reproduce in Firefox, both only appear at
    extreme SVG viewBox zoom factors, both seem to stem from how the raw/local-space numeric values are handled
    rather than the final computed on-screen geometry. Mentioning this in case triage wants to look at both
    together, even though they are filed as separate reports per the "one problem per report" guideline.

See Also https://bugzilla.mozilla.org/show_bug.cgi?id=2082794

Expected results

The dashed stroke and circle edges should stay crisp regardless of the SVG's internal viewBox zoom factor,
the same way they do in Chrome, Edge, and Opera - rendering quality should depend only on the final on-screen
(post-transform) size of the stroke/shape, not on the magnitude of the raw, local-space numbers used to
describe it.

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

viewBox resolution is 1/60 so if you use small values it's not going to work very well.

:aosmond, since you are the author of the regressor, bug 1681921, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(aosmond)
Flags: needinfo?(aosmond) → needinfo?(tnikkel)
See Also: → 2082794
Summary: SVG dashed stroke loses definition and renders as a blurry wash at extreme viewBox zoom, not reproducible in Chrome/Edge → SVG dashed stroke loses definition and renders as a blurry wash at extreme viewBox zoom, not reproducible in Chrome/Edge (ChooseScale)
Severity: -- → S3
See Also: → 1929340
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: