Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d8c9786a163a0e54418f0619723e128a4b9e7d47
https://github.com/WebKit/WebKit/commit/d8c9786a163a0e54418f0619723e128a4b9e7d47
Author: Tyler Wilcock <[email protected]>
Date: 2025-06-11 (Wed, 11 Jun 2025)
Changed paths:
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AXTextMarker.cpp
M Source/WebCore/accessibility/AXTextMarker.h
M Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm
M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
AX: Implement support for AXAttributedStringForRange off the main-thread
https://bugs.webkit.org/show_bug.cgi?id=294211
rdar://152849965
Reviewed by Joshua Hoffman.
Even prior to this commit, we've already had the ability to turn
AXTextMarkerRanges into attributed strings. The only
missing piece to move this API off the main-thread was making
AXIsolatedObject::textMarkerRangeForNSRange use off-main
thread data to do the conversion.
Behavior tested by existing layout tests, e.g.:
- accessibility/mac/attributed-string-includes-misspelled-with-selection.html
- accessibility/content-editable-as-textarea.html
- accessibility/native-text-control-attributed-string.html
These layout tests exposed an existing deficiency in our NSRange to
AXTextMarkerRange conversion — we did not handle
out-of-bounds NSRanges, and did not limit traversal to stay within the "root"
of the NSRange. Both are fixed with
this commit.
* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::nextMarkerFromOffset const):
* Source/WebCore/accessibility/AXTextMarker.h:
* Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm:
(WebCore::Accessibility::markerRangeFrom):
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::textMarkerRangeForNSRange const):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(computeTextBoundsForRange):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(markerRangeFrom): Deleted.
Canonical link: https://commits.webkit.org/296085@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes