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.
<rdar://82428383>
Created attachment 437840 [details] Patch
Created attachment 438012 [details] Patch
Created attachment 438013 [details] gradient-start-end-repeat
Created attachment 438014 [details] gradient-start-end-reflect
Created attachment 438015 [details] gradient-start-end-negative-repeat
Created attachment 438016 [details] gradient-start-end-negative-reflect
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.
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)`
Created attachment 438214 [details] Patch
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].