Bug 283127
| Summary: | REGRESSION(265569@main): Fix division by zero in calculating the boundingRect of a QuadraticCurve | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
| Component: | SVG | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=255898 https://bugs.webkit.org/show_bug.cgi?id=279105 |
||
Said Abou-Hallawa
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/139904014>
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/36653
EWS
Committed 286618@main (dae159bae231): <https://commits.webkit.org/286618@main>
Reviewed commits have been landed. Closing PR #36653 and removing active labels.