NEW249307
SVG stroke-dashoffset negative values are rendered with wrong offsets
https://bugs.webkit.org/show_bug.cgi?id=249307
Summary SVG stroke-dashoffset negative values are rendered with wrong offsets
kari.pihkala
Reported 2022-12-14 06:15:09 PST
Created attachment 464039 [details] negative-dash.svg Negative dash offset values in the stroke-dashoffset property are rendered incorrectly if the stroke-dasharray property has an odd number of values (e.g. "60", "60 90 30" etc). Negative dash offset values are rendered correctly if the stroke-dasharray has an even number of values (e.g. "60 60", "60 60 10 20" etc). The attached negative-dash.svg test file can be used to test the rendering. The expected result is that the left and right side rendering looks identical. Safari renders the lines marked with blue text incorrectly, see the attached file safari-16.1-dashoffset.png. Tested on Safari 16.1 and Safari Tech Preview Release 159 (Safari 16.4, WebKit 17615.1.12.130.1). Chrome 108 and Firefox 107 render all lines correctly. They render the animation so that it doesn't jump when the value is animated from a negative value to a positive value. I also tested on macOS 10.6.8 Snow Leopard Safari version 5.1.10 (6534.59.10) and it renders all lines correctly (see the file safari-5.1.10-dashoffset.png). Safari 10.1.2 on macOS 10.12.6 Sierra gives the same incorrect result as Safari 16.1, so it seems that the bug appeared between Safari 5 and 10.. Note that there is currently an open issue about this on the SVG working group's repository: https://github.com/w3c/svgwg/issues/795 - but to me this looks like a regression which happened after Safari 5.
Attachments
negative-dash.svg (1.97 KB, image/svg+xml)
2022-12-14 06:15 PST, kari.pihkala
no flags
safari-5.1.10-dashoffset.png (83.01 KB, image/png)
2022-12-14 06:16 PST, kari.pihkala
no flags
safari-16.1-dashoffset.png (111.68 KB, image/png)
2022-12-14 06:16 PST, kari.pihkala
no flags
kari.pihkala
Comment 1 2022-12-14 06:16:00 PST
Created attachment 464040 [details] safari-5.1.10-dashoffset.png
kari.pihkala
Comment 2 2022-12-14 06:16:33 PST
Created attachment 464041 [details] safari-16.1-dashoffset.png
Radar WebKit Bug Importer
Comment 3 2022-12-21 06:16:17 PST
Note You need to log in before you can comment on or make changes to this bug.