Bug 236947 - stroke-dasharray="0,..." with round endcap is rendered incorrectly
Summary: stroke-dasharray="0,..." with round endcap is rendered incorrectly
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-20 20:12 PST by Kevin Wu Won
Modified: 2022-06-30 10:47 PDT (History)
6 users (show)

See Also:


Attachments
sample svg file (699 bytes, image/svg+xml)
2022-02-20 20:12 PST, Kevin Wu Won
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Wu Won 2022-02-20 20:12:56 PST
Created attachment 452708 [details]
sample svg file

See the attached test case.

Chrome renders it correctly, Webkit does not. The last two lines should be almost identical. One has stroke-dasharray="0.001,1.999" while the other has stroke-dasharray="0,2". Webkit is treating the latter as if it were "1,1".

Release 140 (Safari 15.4, WebKit 16614.1.1.5)

---

<svg viewBox="0 0 50 50" width="500" height="500" xmlns="http://www.w3.org/2000/svg">
  <line x1="1" y1="1" x2="49" y2="1" stroke-dasharray="1,1" stroke-linecap="round" stroke-width="1" stroke="#000000"></line>
  <line x1="1" y1="11" x2="49" y2="11" stroke-dasharray="0.5,1.5" stroke-linecap="round" stroke-width="1" stroke="#000000"></line>

  <!-- these last two should look identical, but they are quite different in Safari -->
  <line x1="1" y1="21" x2="49" y2="21" stroke-dasharray="0.001,1.999" stroke-linecap="round" stroke-width="1" stroke="#000000"></line>
  <line x1="1" y1="31" x2="49" y2="31" stroke-dasharray="0,2" stroke-linecap="round" stroke-width="1" stroke="#000000"></line>
</svg>
Comment 1 Radar WebKit Bug Importer 2022-02-21 13:37:11 PST
<rdar://problem/89254117>
Comment 2 Simon Fraser (smfr) 2022-02-21 13:37:51 PST
This is a bug in an underlying graphics framework, and will be tracked by the above radar.
Comment 3 Brent Fulgham 2022-06-30 10:47:29 PDT
We believe the fix for this is available in macOS Ventura Beta 1 (and newer).