Bug 223176 - Enable the layout test 2d.path.stroke.scale2.html
Summary: Enable the layout test 2d.path.stroke.scale2.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 222835
  Show dependency treegraph
 
Reported: 2021-03-15 01:36 PDT by Said Abou-Hallawa
Modified: 2021-03-15 13:23 PDT (History)
4 users (show)

See Also:


Attachments
test case (1.89 KB, text/html)
2021-03-15 01:36 PDT, Said Abou-Hallawa
no flags Details
test case (726 bytes, text/html)
2021-03-15 01:37 PDT, Said Abou-Hallawa
no flags Details
Patch (5.83 KB, patch)
2021-03-15 01:46 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (7.67 KB, patch)
2021-03-15 11:06 PDT, Said Abou-Hallawa
thorton: review+
Details | Formatted Diff | Diff
Patch (7.78 KB, patch)
2021-03-15 12:16 PDT, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2021-03-15 01:36:23 PDT
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()".
Comment 1 Said Abou-Hallawa 2021-03-15 01:37:55 PDT
Created attachment 423147 [details]
test case
Comment 2 Said Abou-Hallawa 2021-03-15 01:45:25 PDT
rdar://75419465 is the internal radar which tracks the CGPathAddRect() bug.
Comment 3 Said Abou-Hallawa 2021-03-15 01:46:52 PDT
Created attachment 423148 [details]
Patch
Comment 4 Said Abou-Hallawa 2021-03-15 11:06:26 PDT
Created attachment 423202 [details]
Patch
Comment 5 Tim Horton 2021-03-15 12:02:09 PDT
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 6 Said Abou-Hallawa 2021-03-15 12:08:30 PDT
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.
Comment 7 Said Abou-Hallawa 2021-03-15 12:16:34 PDT
Created attachment 423217 [details]
Patch
Comment 8 EWS 2021-03-15 13:11:52 PDT
Committed r274434: <https://commits.webkit.org/r274434>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 423217 [details].
Comment 9 Radar WebKit Bug Importer 2021-03-15 13:12:15 PDT
<rdar://problem/75443379>