[Webkit-unassigned] [Bug 245420] New: Safari 16 fails to correctly apply strokeStyle to canvas paths
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 20 04:07:30 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=245420
Bug ID: 245420
Summary: Safari 16 fails to correctly apply strokeStyle to
canvas paths
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: iOS 16
Status: NEW
Severity: Major
Priority: P2
Component: Canvas
Assignee: webkit-unassigned at lists.webkit.org
Reporter: paul.neave at gmail.com
CC: dino at apple.com
Created attachment 462469
--> https://bugs.webkit.org/attachment.cgi?id=462469&action=review
Demo HTML/JS
Major bug in Safari 16 (iOS and macOS) when drawing paths with strokeStyle in 2D canvas.
The demo code below draws three small lines. One red, one blue, and the last one red.
In Safari 16, the third line is incorrectly colored blue.
```
<html>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
const context = canvas.getContext('2d');
context.lineWidth = 6;
context.beginPath();
context.strokeStyle = 'red';
context.moveTo(30, 50);
context.lineTo(50, 50);
context.stroke();
context.beginPath();
context.strokeStyle = 'blue';
context.moveTo(60, 50);
context.lineTo(80, 50);
context.stroke();
context.beginPath();
context.strokeStyle = 'red';
context.moveTo(90, 50);
context.lineTo(110, 50);
context.stroke();
</script>
</body>
</html>
```
In all other browsers, including previous versions of Safari, the strokeStyle color is adhered to on a third call. In Safari 16, it does not update the color and it stays on the previous color.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220920/8b606385/attachment.htm>
More information about the webkit-unassigned
mailing list