LibWeb: Normalize the angle delta in CanvasPath::ellipse()

This fixes both the incorrect arc and ellipse from #22817.
This commit is contained in:
MacDue 2024-03-24 15:17:50 +00:00 committed by Andreas Kling
parent b31fb36ed3
commit c6899b79b6
Notes: sideshowbarker 2024-07-17 02:56:25 +09:00
4 changed files with 33 additions and 0 deletions

View file

@ -157,6 +157,8 @@ WebIDL::ExceptionOr<void> CanvasPath::ellipse(float x, float y, float radius_x,
auto end_point = resolve_point_with_angle(end_angle);
auto delta_theta = end_angle - start_angle;
if (delta_theta < 0)
delta_theta += AK::Pi<float> * 2;
auto transform = active_transform();