Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34e0f2e73041cd3033b218cebd696bf1f4bd2ed1
https://github.com/WebKit/WebKit/commit/34e0f2e73041cd3033b218cebd696bf1f4bd2ed1
Author: Ahmad Saleem <[email protected]>
Date: 2023-10-30 (Mon, 30 Oct 2023)
Changed paths:
M Source/WebCore/html/canvas/CanvasPath.cpp
Log Message:
-----------
Simplify 'normalizeAngles' function and potential assertion fix
'newStartAngle >= 0...'
https://bugs.webkit.org/show_bug.cgi?id=250384
rdar://problem/104332195
Reviewed by Kimmo Kinnunen.
Merge:
https://chromium.googlesource.com/chromium/blink/+/651895c0233495405847471d42dab20deab2a0f3
This PR simplify multiple '2 * piFloat' calls by introducing object declaration
in start.
Additionally, We can calculate `newStartAngle` as follows if `startAngle` is
negative value.
newStartAngle = twoPiFloat + fmodf(startAngle, -twoPiFloat);
The fmodf() is always 0 if `startAngle` is negative multiples of `twoPiFloat`.
So, `newStartAngle` will be `twoPiFloat` and it can cause assertion failure.
* Source/WebCore/html/canvas/CanvasPath.cpp:
(normalizeAngles):
Canonical link: https://commits.webkit.org/269925@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes