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)
Tracking
()
People
(Reporter: mizery01, Unassigned, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
3.51 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0
Steps to reproduce
- Open the attached file
firefox-svg-blur-repro.htmlin 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). - 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. - 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.
Comment 1•1 month 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 2•1 month ago
|
||
viewBox resolution is 1/60 so if you use small values it's not going to work very well.
Comment 3•1 month ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=3c36156a38e3738afe6488ea8cfce7cbbc7e0c6b&tochange=6567bdeb3c1e97a75f12fd72d92a6fb4a2cfcc91
Comment 4•1 month ago
|
||
: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.
Updated•1 month ago
|
Comment 5•29 days ago
|
||
There's also a potential ChooseScale issue here. The scale maxes out at 32k.
Description
•