Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 622e178d0c644289f4b9e51305047e4fa62a4fc3
https://github.com/WebKit/WebKit/commit/622e178d0c644289f4b9e51305047e4fa62a4fc3
Author: Tyler Wilcock <[email protected]>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
A LayoutTests/accessibility/mac/bezier-path-curves-expected.txt
A LayoutTests/accessibility/mac/bezier-path-curves.html
M LayoutTests/resources/accessibility-helper.js
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
AX: Quad and cubic Bézier curve conversions aren't handled correctly in
WebAccessibilityObjectWrapperMac, causing incorrect paths to be returned
https://bugs.webkit.org/show_bug.cgi?id=311662
rdar://174252190
Reviewed by Joshua Hoffman.
WebTransformCGPathToNSBezierPath had two bugs that caused incorrect
VoiceOver cursor paths:
1. Quadratic Bézier curves (kCGPathElementAddQuadCurveToPoint) were
silently dropped by the default switch case. NSBezierPath has no
quad curve method, so promote them to cubic curves using the
standard 2/3 conversion formula.
2. Cubic Bézier curves (kCGPathElementAddCurveToPoint) had the wrong
argument order: points[0] (cp1) was passed as the endpoint to
curveToPoint:controlPoint1:controlPoint2:, which expects the
endpoint first. Reorder to points[2], points[0], points[1].
Remove the default case since all CGPathElementType values are now
handled explicitly.
* LayoutTests/accessibility/mac/bezier-path-curves-expected.txt: Added.
* LayoutTests/accessibility/mac/bezier-path-curves.html: Added.
* LayoutTests/resources/accessibility-helper.js:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _additionalAccessibilityAttributeNames:]):
(WebTransformCGPathToNSBezierPath):
Canonical link: https://commits.webkit.org/310752@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications