Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f86a4c7d651fa385c4a869d58c7fe2f4126b8731
https://github.com/WebKit/WebKit/commit/f86a4c7d651fa385c4a869d58c7fe2f4126b8731
Author: Andres Gonzalez <[email protected]>
Date: 2026-03-11 (Wed, 11 Mar 2026)
Changed paths:
M
LayoutTests/accessibility/mac/intersection-with-selection-range-expected.txt
M LayoutTests/accessibility/mac/intersection-with-selection-range.html
M LayoutTests/platform/mac-sequoia/TestExpectations
M LayoutTests/platform/mac-sonoma/TestExpectations
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
M
Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp
M Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.h
M Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.h
M Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm
M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.h
M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
M
Tools/WebKitTestRunner/InjectedBundle/playstation/AccessibilityUIElementPlayStation.cpp
M
Tools/WebKitTestRunner/InjectedBundle/playstation/AccessibilityUIElementPlayStation.h
M Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp
M Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.h
Log Message:
-----------
AX: Make AXIntersectionWithSelectionRange return a TextMarkerRange and not an
NSRange.
https://bugs.webkit.org/show_bug.cgi?id=308169
<rdar://problem/170671475>
Reviewed by Tyler Wilcock.
Changed AXIntersectionWithSelectionRange to return the text marker range
instead of converting to an NSRange. This allows the attribute to work for
element types other than static text, and for ranges that are not confined to a
single object.
For backward compatibility, the previous implementation returning an NSRange is
preserved for OS versions up to macOS 26.4 using the
HAVE(AX_TEXT_MARKER_RANGE_FOR_INTERSECTION_WITH_SELECTION_RANGE) macro defined
in PlatformHave.h. On OS versions up to macOS 26.4, the attribute continues to
require a static text precondition and returns an NSRange. The updated test is
skipped on Tahoe and earlier.
Updated the AccessibilityUIElement test infrastructure to return
RefPtr<AccessibilityTextMarkerRange> instead of JSRetainPtr<JSStringRef> for
the intersectionWithSelectionRange property, and update the IDL binding
accordingly.
Updated the test intersection-with-selection-range.html to use the modified API
and made the test clearer and easier to identify failures. This test is now set
to run on ITM only, because it fails in ITM off. Will follow up with a bug for
that issue.
* LayoutTests/accessibility/mac/intersection-with-selection-range-expected.txt:
* LayoutTests/accessibility/mac/intersection-with-selection-range.html:
* LayoutTests/platform/mac-sequoia/TestExpectations:
* LayoutTests/platform/mac-sonoma/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(handleIntersectionWithSelectionRangeAttribute):
(createAttributeHandlerMap):
(matchesPrecondition):
(-[WebAccessibilityObjectWrapper intersectionWithSelectionRange]): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::intersectionWithSelectionRange):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElementAtspi::intersectionWithSelectionRange):
* Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.h:
* Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.h:
* Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElementIOS::intersectionWithSelectionRange):
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.h:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElementMac::intersectionWithSelectionRange):
*
Tools/WebKitTestRunner/InjectedBundle/playstation/AccessibilityUIElementPlayStation.cpp:
(WTR::AccessibilityUIElementPlayStation::intersectionWithSelectionRange):
*
Tools/WebKitTestRunner/InjectedBundle/playstation/AccessibilityUIElementPlayStation.h:
* Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElementWin::intersectionWithSelectionRange):
* Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.h:
Canonical link: https://commits.webkit.org/309086@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications