RESOLVED FIXED230145
Linear gradient sometimes is drawn incorrectly and sometimes hangs
https://bugs.webkit.org/show_bug.cgi?id=230145
Summary Linear gradient sometimes is drawn incorrectly and sometimes hangs
Said Abou-Hallawa
Reported 2021-09-09 23:19:46 PDT
Created attachment 437839 [details] test case Open the attached test case. The linear gradient is not displayed correctly because the start point is greater the end point. The gradient has to be flipped in this case.
Attachments
test case (737 bytes, image/svg+xml)
2021-09-09 23:19 PDT, Said Abou-Hallawa
no flags
Patch (6.21 KB, patch)
2021-09-09 23:26 PDT, Said Abou-Hallawa
no flags
Patch (10.81 KB, patch)
2021-09-12 22:31 PDT, Said Abou-Hallawa
simon.fraser: review+
gradient-start-end-repeat (3.25 KB, image/svg+xml)
2021-09-12 22:33 PDT, Said Abou-Hallawa
no flags
gradient-start-end-reflect (3.25 KB, image/svg+xml)
2021-09-12 22:33 PDT, Said Abou-Hallawa
no flags
gradient-start-end-negative-repeat (3.30 KB, image/svg+xml)
2021-09-12 22:34 PDT, Said Abou-Hallawa
no flags
gradient-start-end-negative-reflect (3.30 KB, image/svg+xml)
2021-09-12 22:34 PDT, Said Abou-Hallawa
no flags
Patch (10.83 KB, patch)
2021-09-14 22:53 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2021-09-09 23:22:29 PDT
Said Abou-Hallawa
Comment 2 2021-09-09 23:26:44 PDT
Said Abou-Hallawa
Comment 3 2021-09-12 22:31:57 PDT
Said Abou-Hallawa
Comment 4 2021-09-12 22:33:17 PDT
Created attachment 438013 [details] gradient-start-end-repeat
Said Abou-Hallawa
Comment 5 2021-09-12 22:33:39 PDT
Created attachment 438014 [details] gradient-start-end-reflect
Said Abou-Hallawa
Comment 6 2021-09-12 22:34:08 PDT
Created attachment 438015 [details] gradient-start-end-negative-repeat
Said Abou-Hallawa
Comment 7 2021-09-12 22:34:33 PDT
Created attachment 438016 [details] gradient-start-end-negative-reflect
Said Abou-Hallawa
Comment 8 2021-09-12 22:41:34 PDT
Some of the gradients in the attached test cases are not drawn correctly. And If the comments are removed from them, they will hang. The attached patch fixes the correctness and the hang.
Simon Fraser (smfr)
Comment 9 2021-09-14 13:05:27 PDT
Comment on attachment 438012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438012&action=review > Source/WebCore/platform/graphics/cg/GradientCG.cpp:154 > + return CGRectGetMaxX(boundingBox) <= std::min(start, end); For symmetry I would write this as `return std::min(start, end) > CGRectGetMaxX(boundingBox)`
Said Abou-Hallawa
Comment 10 2021-09-14 22:53:25 PDT
EWS
Comment 11 2021-09-15 00:26:26 PDT
Committed r282443 (241696@main): <https://commits.webkit.org/241696@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438214 [details].
Note You need to log in before you can comment on or make changes to this bug.