Bug 263387
| Summary: | [GPU Process] REGRESSION: display-p3 stroke color in canvas crashes the webpage | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Starli0n <s_theroude> |
| Component: | Canvas | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| Status: | RESOLVED FIXED | ||
| Severity: | Critical | CC: | dino, sabouhallawa, webkit-bug-importer, webkit-unassigned |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 17 | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 14 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=264000 | ||
Starli0n
+++ This bug was initially created as a clone of Bug #263375 +++
In this version of Safari, the bug mentioned above is getting worst.
Instead of having an invisible stroke, it crashes the webpage.
Here is an updated sample, with some comments, to easily reproduce the bug:
(The code needs to be copy/paste)
The aim is to draw two lines with the same color but with a different line width.
// https://www.w3schools.com/jsref/tryit.asp?filename=tryhtml5_canvas_stroke
<!DOCTYPE html>
<html>
<body>
<h1>HTML5 Canvas</h1>
<h2>The stroke() Method</h2>
<canvas id="myCanvas" width="300" height="150" style="border:1px solid grey"></canvas>
<script>
const c = document.getElementById("myCanvas");
const ctx = c.getContext("2d");
ctx.strokeStyle = "color(display-p3 1 0 0 / 1)";
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(20, 20);
ctx.lineTo(20, 100);
ctx.stroke();
// ctx.strokeStyle = "color(display-p3 0 0 1 / 1)"; // <== Uncomment this, to not have the bug but the color are not the same
ctx.lineWidth = 2;
ctx.beginPath();
// ctx.moveTo(-1, -1); <<== Uncomment this to have a workaround that fulfill the purpose of the code
ctx.moveTo(40, 20);
ctx.lineTo(40, 100);
ctx.stroke(); // <<== It crashes here !!
</script>
</body>
</html>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/117226767>
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/19383
EWS
Committed 269664@main (922c037bca6e): <https://commits.webkit.org/269664@main>
Reviewed commits have been landed. Closing PR #19383 and removing active labels.
Said Abou-Hallawa
Re-opening for pull request https://github.com/apple/WebKit/pull/892
EWS
Committed 267815.463@safari-7617-branch (584274dcf192): <https://commits.webkit.org/267815.463@safari-7617-branch>
Reviewed commits have been landed. Closing PR #892 and removing active labels.