Bug 249218

Summary: SVG path with a dash renders incorrectly
Product: WebKit Reporter: kari.pihkala
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: sabouhallawa, simon.fraser, webkit-bug-importer, zalan, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
path-dash.svg
none
safari-16.1.png
none
safari-5.1.10.png none

Description kari.pihkala 2022-12-13 05:50:19 PST
Created attachment 464022 [details]
path-dash.svg

An SVG path with a dash is rendered incorrectly in Safari. The result should look like a dashed rectangle. See the attached test case path-dash.svg and the screenshot safari-16.1.png.

Tested on Safari 16.1 and Tech Preview Release 159 (Safari 16.4, WebKit 17615.1.12.130.1) (Intel and Apple Silicon Macs).

Chrome 108 and Firefox 107 render the path correctly. I also tested on macOS 10.6.8 Snow Leopard Safari version 5.1.10 (6534.59.10) and it renders the path correctly (see the file safari-5.1.10.png). Safari 10.1.2 on macOS 10.12.6 Sierra doesn't render the path correctly, so it seems that the bug appeared somewhere between those two versions..
Comment 1 kari.pihkala 2022-12-13 05:50:50 PST
Created attachment 464023 [details]
safari-16.1.png
Comment 2 kari.pihkala 2022-12-13 05:51:18 PST
Created attachment 464024 [details]
safari-5.1.10.png
Comment 3 Alexey Proskuryakov 2022-12-14 11:59:47 PST
Curiously, when I Cmd+click on the test link, and switch to the new tab, it looks broken for a second, and then repaints (mostly) correctly. There is still a difference in that corners are rounded.
Comment 4 Simon Fraser (smfr) 2022-12-14 13:13:46 PST
That sounds like accelerated drawing vs non-accelerated drawing.
Comment 5 Radar WebKit Bug Importer 2022-12-14 13:14:00 PST
<rdar://problem/103369585>
Comment 6 Simon Fraser (smfr) 2022-12-14 13:17:17 PST
Bug is in a component below WebKit.