RESOLVED FIXED 263387
[GPU Process] REGRESSION: display-p3 stroke color in canvas crashes the webpage
https://bugs.webkit.org/show_bug.cgi?id=263387
Summary [GPU Process] REGRESSION: display-p3 stroke color in canvas crashes the webpage
Starli0n
Reported 2023-10-19 12:20:04 PDT
+++ 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
Radar WebKit Bug Importer
Comment 1 2023-10-19 14:46:55 PDT
Said Abou-Hallawa
Comment 2 2023-10-20 17:05:39 PDT
EWS
Comment 3 2023-10-23 13:48:01 PDT
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
Comment 4 2023-10-27 12:36:31 PDT
Re-opening for pull request https://github.com/apple/WebKit/pull/892
EWS
Comment 5 2023-10-27 18:45:06 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.