| Summary: | REGRESSION (Safari 16): Canvas will intermittently come up blurry and remain so | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Graham Murray <gmurray> |
| Component: | Canvas | Assignee: | Matt Woodrow <mattwoodrow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Critical | CC: | ap, dino, sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P1 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Graham Murray
2023-05-03 09:19:42 PDT
FWIW, I'm finding it to always be blurry with Safari 16.5 beta. Doesn't reproduce in Chrome. @Alexey, The specific repro I sent here triggers the blurriness more often than others. But it will sporadically come up crisp. I've seen other scenarios where there are multiple components using canvases configured identically and some of them will come up blurry and some of them will come up crisp on the same refresh. I'm wondering if the likelihood of triggering the issue may have to do with the size of the allocated surface? But this is just guesswork. In the page https://www.infragistics.com/webcomponents-demos/charts/category-chart/line-chart-multiple-sources, there are three canvases stacked on top of each other. On 2x display, this markup can be seen in WebInspector: <canvas style="position: absolute; top: 0px; left: 0px; width: 2163px; height: 1183px;" width="4326" height="2366"></canvas> <canvas style="position: absolute; top: 0px; left: 0px; width: 2163px; height: 1183px;" width="4326" height="2366"></canvas> <canvas style="position: absolute; top: 0px; left: 0px; touch-action: none; -webkit-user-select: none; width: 2163px; height: 1183px; outline: 0px;" width="4326" height="2366" tabindex="0"></canvas> The css width and height are half the width and height attributes values. On 1x display, this is the markup of these canvases: <canvas style="position: absolute; top: 0px; left: 0px; width: 2163px; height: 1183px;" width="2163" height="1183"></canvas> <canvas style="position: absolute; top: 0px; left: 0px; width: 2163px; height: 1183px;" width="2163" height="1183"></canvas> <canvas style="position: absolute; top: 0px; left: 0px; touch-action: none; -webkit-user-select: none; width: 2163px; height: 1183px; outline: 0px;" width="2163" height="1183" tabindex="0"></canvas> So the css width and height match the width and height attributes values. On 1x display the bug can't be reproduced. I think somehow also the bug is related to the aspect ratio of the canvas. If the aspect ratio is bigger than 2, it does not happen For example this size does not repro the bug: <canvas style="position: absolute; top: 0px; left: 0px; width: 2288px; height: 169px;" width="4576" height="338"></canvas> But this size does repro the bug: <canvas style="position: absolute; top: 0px; left: 0px; width: 558px; height: 1182px;" width="1116" height="2364"></canvas> Pull request: https://github.com/WebKit/WebKit/pull/14464 Committed 264699@main (282f60810467): <https://commits.webkit.org/264699@main> Reviewed commits have been landed. Closing PR #14464 and removing active labels. |