[Webkit-unassigned] [Bug 283127] New: REGRESSION(265569 at main): Fix division by zero in calculating the bounding rect of a QuadraticCurve

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 14 13:10:21 PST 2024


https://bugs.webkit.org/show_bug.cgi?id=283127

            Bug ID: 283127
           Summary: REGRESSION(265569 at main): Fix division by zero in
                    calculating the bounding rect of a QuadraticCurve
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: sabouhallawa at apple.com, zimmermann at kde.org

This function calculates the vertex of a QuadraticCurve. p0, p1 and p2 represent the currentPoint, controlPoint and endPoint respectively.

float calculateQuadraticExtremity(float p0, float p1, float p2)
{
    float t = (p0 - p1) / (p0 - 2 * p1 + p2);
    return calculateQuadratic(t, p0, p1, p2);
}

If the QuadraticCurve is symmetric, the control point is be the mid-point between the currentPoint and the endPoint. In this case (p0 - 2 * p1 + p2) is equal to zero.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241114/113cc64c/attachment.htm>


More information about the webkit-unassigned mailing list