Bug 258375

Summary: Stroke is rendering the SVG with jagged edges
Product: WebKit Reporter: maria
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, alex, heycam, karlcow, ldebeasi, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Unspecified   
OS: macOS 13   
Attachments:
Description Flags
Reproduction in a minimal environment.
none
Safari displaying jagged SVG
none
Firefox displaying smooth SVG
none
Chrome displaying smooth SVG
none
Video displaying the difference between Firefox and Safari none

maria
Reported 2023-06-21 16:19:33 PDT
Created attachment 466779 [details] Reproduction in a minimal environment. # Safari SVG jagged edges ## Reproduction Check the attached file called `index.html` ## Description The SVG keeps rendering with jagged edges. This does not happen in Firefox or Chrome. ## Steps to reproduce 1. Add `fill: white` to the SVG to make it easier to see the jagged edges 2. Add `stroke: black` to the SVG to make it easier to see the jagged edges 3. Add `width: 32px; height: 32px;` to the SVG, the smaller the size the more the edges become jagged ## Expected behavior The SVG should have smooth edges. ## Actual behavior The SVG does not have smooth edges, some sections of it show jagged areas. ## Other information The SVG renders with smooth edges on Firefox and Chrome.
Attachments
Reproduction in a minimal environment. (1.16 KB, text/html)
2023-06-21 16:19 PDT, maria
no flags
Safari displaying jagged SVG (6.86 KB, image/png)
2023-06-21 16:24 PDT, maria
no flags
Firefox displaying smooth SVG (1.99 KB, image/png)
2023-06-21 16:25 PDT, maria
no flags
Chrome displaying smooth SVG (4.72 KB, image/png)
2023-06-21 16:27 PDT, maria
no flags
Video displaying the difference between Firefox and Safari (4.54 MB, video/quicktime)
2023-06-21 17:20 PDT, maria
no flags
maria
Comment 1 2023-06-21 16:24:51 PDT
Created attachment 466780 [details] Safari displaying jagged SVG
maria
Comment 2 2023-06-21 16:25:57 PDT
Created attachment 466781 [details] Firefox displaying smooth SVG
maria
Comment 3 2023-06-21 16:26:21 PDT
Comment on attachment 466780 [details] Safari displaying jagged SVG I've added arrows to the location of the jagged edges.
maria
Comment 4 2023-06-21 16:27:54 PDT
Created attachment 466782 [details] Chrome displaying smooth SVG
Ahmad Saleem
Comment 5 2023-06-21 16:42:43 PDT
I am unable to reproduce this using Safari 16.5.1 using attached test case. Any specific condition or steps, I need to do?
maria
Comment 6 2023-06-21 17:01:04 PDT
I'm using Safari v16.5.0. There shouldn't be anything extra needed. I can also reproduce it on Stackblitz through https://stackblitz.com/edit/web-platform-uu2cbv?file=index.html Does the link help?
Ahmad Saleem
Comment 7 2023-06-21 17:05:33 PDT
(In reply to maria from comment #6) > I'm using Safari v16.5.0. There shouldn't be anything extra needed. > > I can also reproduce it on Stackblitz through > https://stackblitz.com/edit/web-platform-uu2cbv?file=index.html > > Does the link help? If I zoom in a lot and put focus then I see some smoothness issue on the outline but not similar to attached screenshots. :-( Can you share your OS and machine details? Because I think macOS 13.2 (Ventura) also had some system level improvement to fix some SVG bugs. Also Apple Silicon or Intel might also be an issue. I am using macOS 13.4.1 using Safari 16.5.1 on M1 Pro 38 GPU core to reproduce this issue.
maria
Comment 8 2023-06-21 17:12:21 PDT
I'm using macOS 13.4 with Safari 16.5.0 on M2 Max.
maria
Comment 9 2023-06-21 17:13:56 PDT
I updated the fill on the Stackblitz environment to mimic the screenshots.
maria
Comment 10 2023-06-21 17:20:22 PDT
Created attachment 466784 [details] Video displaying the difference between Firefox and Safari
Radar WebKit Bug Importer
Comment 11 2023-06-28 16:20:18 PDT
Liam DeBeasi
Comment 12 2023-07-10 07:59:23 PDT
This issue also reproduces on iOS. I am able to reproduce using the filled "airplane" or filled "people-circle" icons on ionicons.com. I cannot reproduce this issue on iOS 15.6, but I can reproduce it on iOS 16.5 so this does appear to be a regression.
alex
Comment 13 2024-03-08 13:50:20 PST
This appears to be resolved in iOS 17.4
maria
Comment 14 2024-03-12 12:20:29 PDT
I have verified that this was fixed in iOS 17.3.
Note You need to log in before you can comment on or make changes to this bug.