thin SVG rect disappearing
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | wontfix |
firefox102 | --- | wontfix |
firefox103 | --- | wontfix |
firefox104 | --- | wontfix |
firefox105 | --- | wontfix |
firefox106 | --- | wontfix |
firefox107 | --- | wontfix |
firefox108 | --- | wontfix |
firefox109 | --- | wontfix |
firefox110 | --- | wontfix |
firefox112 | --- | verified |
firefox113 | --- | verified |
firefox114 | --- | verified |
People
(Reporter: lxpugin, Assigned: tnikkel)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
35.95 KB,
application/zip
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-release+
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
SVG files with <rect>
within a viewBox do not show anymore; scaling is different than with previous versions of Firefox
UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0
To reproduce, display the SVG file example.svg in the archive
Actual results:
<rect>
can disappear, although not all of them (see attached file 102.0.1.png)
Expected results:
Was working in previous version of Firefox (see attached files with 101.0.2.png and 100.0.1.png)
Comment 1•3 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 3•3 years ago
|
||
I can reproduce the issue in Nightly104.0a1 Windows10.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=cddcdc46d3484be662cc56ceefe6b282481ca115&tochange=950227a483519fe71798772a0996c02dec2125f1
Updated•3 years ago
|
Comment 4•3 years ago
|
||
:nical, since you are the author of the regressor, bug 1686654, could you take a look?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
![]() |
||
Comment 5•3 years ago
|
||
Maybe S2 depending on how widespread it is. Waiting on Nical for feedback / severity update.
Comment 6•3 years ago
|
||
Set release status flags based on info from the regressing bug 1686654
Updated•3 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
This doesn't seem to be affecting real content. Lowering the severity.
This doesn't seem to be affecting real content. Lowering the severity.
What do you mean "not affecting real content"?? We have been using SVG in real world applications for many years and it has been working without problem in all browsers. The SVG is used to display music scores. Some of the content disappear when rendered with Firefox, which makes it unusable. This is a new issue in Firefox. Do you need more information?
Comment 9•2 years ago
|
||
lxpugin do you have an example URL that runs into this bug?
Updated•2 years ago
|
Reporter | ||
Comment 10•2 years ago
|
||
Thank you for reconsidering the severity change. This is one example https://www.verovio.org/mei-viewer.xhtml
If you open the panel on the right and zoom out you will see the some of the vertical lines attached to the music notes disappear.
Comment 11•2 years ago
|
||
I can confirm that this is also a problem on Firefox 104 (macOS 12.5).
It happens only at certain sizes and offsets. To reproduce, load the example in comment #2 above, and "pinch zoom" in-and-out. You will see the vertical lines on the notes (the "stems") blinking on and off as you zoom.
I've made an image comparing the different browsers at roughly the same zoom levels, and then have highlighted some areas in the image where the stems have disappeared in Firefox, but display correctly in Safari (Both Safari and Chrome do not exhibit this same "blinking" behaviour when pinch-zooming.)
Comment 12•2 years ago
|
||
The image did not seem to embed correctly, so here it is in a gist: https://gist.github.com/ahankinson/581ca11406dc83acc79b2fc55d3a6566
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 13•2 years ago
|
||
I think that this was caused by the same issue as bug 1792313. I can still reproduce the problem in release (which does not have the fix)but the test case displays properly on nightly.
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 15•2 years ago
|
||
I just checked with 107.0b9 and nightly 108.0a1 (2022-11-12) on Mac it is not fixed.
Reporter | ||
Comment 16•2 years ago
|
||
Here is a GIF (rendering with the nightly mentioned above) illustrating that the problem is still there
https://gist.githubusercontent.com/ahankinson/581ca11406dc83acc79b2fc55d3a6566/raw/06ae7af29ea28b192948f5b06bcc40e2a3a4c64e/disappear.gif
![]() |
||
Comment 17•2 years ago
•
|
||
Yes, I can also reproduce this issue on Firefox107.0RC(build 20221110173214) Nightry108.0a1(build 20221114085151) Windows10.
STR:
- open https://gist.githubusercontent.com/lpugin/61bcde6a97bfca6a14fdd2a5f66e5ded/raw/4ec44185288d94c69ecd777145c1f24595578a85/example.svg
- Zoom in several times if needed
![]() |
||
Updated•2 years ago
|
![]() |
||
Updated•2 years ago
|
![]() |
||
Comment 18•2 years ago
|
||
Requesting re-triage. Not sure if this is something we should be tracking.
Comment 19•2 years ago
|
||
Just taking a look at this as part of bug triage discussion, I presume that the issue is that SVG rendering is using a simple pixel overlap criteria and at some zoom levels the pixel centers happen to be missing the vertical bars (neighboring pixels being left of, and right of, but never exactly on the bars) entirely at some zoom levels, where it would be more ideal if they were antialiased so they would fade to a shade of gray at these zoom levels.
Assignee | ||
Comment 20•2 years ago
|
||
Webrender doesn't seem to handle them well. This of course will affect the balance of making things active, but hopefully this is a good trade off.
Updated•2 years ago
|
Assignee | ||
Comment 21•2 years ago
|
||
(In reply to Ashley Hale [:ahale] from comment #19)
Just taking a look at this as part of bug triage discussion, I presume that the issue is that SVG rendering is using a simple pixel overlap criteria and at some zoom levels the pixel centers happen to be missing the vertical bars (neighboring pixels being left of, and right of, but never exactly on the bars) entirely at some zoom levels, where it would be more ideal if they were antialiased so they would fade to a shade of gray at these zoom levels.
They should be antialiased already, we push a rect here with the aForceAntiAliasing parameter true
So it's some bug with snapping inside webrender maybe?
Comment 22•2 years ago
|
||
Thinking more broadly about this, maybe rect and most other element types in SVG should simply not be snapped at all?
Assignee | ||
Comment 23•2 years ago
|
||
Maybe! I'm not sure. I'm not very familiar with webrender snapping, but from vaguely following the webrender snapping work over the years it seems like a complicated topic with solutions that are either not simple or would upset a balance, so I chose not to jump into that sea.
Comment 24•2 years ago
|
||
If SVG rects are snapped in WR then that's a bug. I think that if it's not already the case, the logic should be to potentially snap if aForceAntialiasing is false (ther might be other things that cause us to not snap, like some types of transforms, I don't know) and never snap if aForceAntialiasing is true.
Updated•2 years ago
|
Comment 25•2 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:tnikkel, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 26•2 years ago
|
||
I need to write a test.
Assignee | ||
Comment 27•2 years ago
|
||
Wrote a test for this last week and updated the revision. I'll push this after the soft freeze.
Updated•2 years ago
|
Comment 28•2 years ago
|
||
Assignee | ||
Comment 30•2 years ago
|
||
Comment on attachment 9310214 [details]
Bug 1780191. Avoid making primitives smaller than one pixel active. r?nical
Beta/Release Uplift Approval Request
- User impact if declined: one pixel wide svg rects don't draw (common in music notation on web)
- 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): small change to heuristics
- String changes made/needed:
- Is Android affected?: Yes
![]() |
||
Comment 31•2 years ago
|
||
bugherder |
Comment 32•2 years ago
|
||
Comment on attachment 9310214 [details]
Bug 1780191. Avoid making primitives smaller than one pixel active. r?nical
Approved for 113.0b4.
Comment 33•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Updated•2 years ago
|
Comment 34•2 years ago
|
||
:tnikkel is this safe enough to uplift to release for 112 dot release? given the regression introduced by bug 1811978 in 112?
Assignee | ||
Comment 36•2 years ago
|
||
Comment on attachment 9310214 [details]
Bug 1780191. Avoid making primitives smaller than one pixel active. r?nical
Beta/Release Uplift Approval Request
- User impact if declined: one pixel wide svg rects don't draw (common in music notation on web)
- 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): small change to heuristics
- String changes made/needed:
- Is Android affected?: Yes
Comment 37•2 years ago
|
||
Reproduced with Fx 112.0a1 (2023-03-02) on Windows 10.
Verified fixed with Fx 114.0a1 (2023-04-18) and Fx 113.0b5 Windows 10, macOS 13 and Ubuntu 22.
Comment 38•2 years ago
|
||
turns out this actually doesnt graft cleanly to release due to the dependency/conflicts of bug 1820752 (which is in 113). let me know if there is a simple conflict resolution, if not it can just ride the 113 trains.
Assignee | ||
Comment 39•2 years ago
|
||
I will make a patch for release, it is simple to do so.
Assignee | ||
Comment 40•2 years ago
|
||
Webrender doesn't seem to handle them well. This of course will affect the balance of making things active, but hopefully this is a good trade off.
Assignee | ||
Comment 41•2 years ago
|
||
Okay, patch that applies cleanly to release is up. The fuzz value on the test might need to be adjusted a bit, just waiting on try results for that.
Assignee | ||
Comment 42•2 years ago
|
||
The fuzz seems fine based on my try run (pushing based on the revision when 112 left mozilla-central), but landing it directly on release might still be different, so a small fuzz update might still be needed.
Assignee | ||
Comment 43•2 years ago
|
||
Comment on attachment 9329499 [details]
Bug 1780191. Avoid making primitives smaller than one pixel active. r=nical
Beta/Release Uplift Approval Request
- User impact if declined: one pixel wide svg rects don't draw (common in music notation on web)
- 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): small change to heuristics
- String changes made/needed:
- Is Android affected?: Yes
Assignee | ||
Updated•2 years ago
|
Comment 44•2 years ago
|
||
Comment on attachment 9329499 [details]
Bug 1780191. Avoid making primitives smaller than one pixel active. r=nical
Approved for 112.0.2 dot release
Comment 45•2 years ago
|
||
bugherder uplift |
Comment 46•2 years ago
|
||
Verified as fixed on Windows 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.
Description
•