Created attachment 423146 [details] test case This test exists in the following locations: canvas/philip/tests/2d.path.stroke.scale2.html imported/w3c/canvas/2d.path.stroke.scale2.html imported/w3c/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html These layout tests are now fixed on macOS and iOS after enabling GPUP for 2D canvas rendering. The reason is CGPathAddRect() has a bug. Encoding the CGPath converts the rectangle command to moveTo and lineTo commands. In the attached test case, the left canvas is drawn incorrectly if GPUP for 2D canvas rendering is disabled. The right canvas is drawn correctly because the "ctx2.rect()" is preceded by the workaround "ctx2.moveTo()".
Created attachment 423147 [details] test case
rdar://75419465 is the internal radar which tracks the CGPathAddRect() bug.
Created attachment 423148 [details] Patch
Created attachment 423202 [details] Patch
Comment on attachment 423202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423202&action=review > LayoutTests/ChangeLog:9 > + 2D canvas rendering. The reason is CGPathAddRect() has a bug. Encoding Did you file a bug about the bug you discovered?
Comment on attachment 423202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423202&action=review >> LayoutTests/ChangeLog:9 >> + 2D canvas rendering. The reason is CGPathAddRect() has a bug. Encoding > > Did you file a bug about the bug you discovered? yes it is rdar://75419465. I will update the change log to include it.
Created attachment 423217 [details] Patch
Committed r274434: <https://commits.webkit.org/r274434> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423217 [details].
<rdar://problem/75443379>