Changeset 273583 in webkit
- Timestamp:
- Feb 26, 2021, 1:02:38 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (modified) (3 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273568 r273583 1 2021-02-26 Andres Gonzalez <andresg_22@apple.com> 2 3 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 4 https://bugs.webkit.org/show_bug.cgi?id=222477 5 <rdar://problem/74793445> 6 7 Reviewed by Chris Fleizach. 8 9 This is a follow up to: https://bugs.webkit.org/show_bug.cgi?id=222154. 10 As Chris Fleizach pointed out in the above review, it is necessary to 11 add a handler in accessibilityAttributeValue:forParameter: for a new AX 12 attribute in order for clients to access this functionality. 13 14 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 15 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 16 (-[WebAccessibilityObjectWrapper textMarkerRangeForNSRange:]): Deleted. 17 1 18 2021-02-26 Jer Noble <jer.noble@apple.com> 2 19 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r273276 r273583 3453 3453 } 3454 3454 3455 - (AXTextMarkerRangeRef)textMarkerRangeForNSRange:(const NSRange&)range3456 {3457 auto* backingObject = self.updateObjectBackingStore;3458 return backingObject ? backingObject->textMarkerRangeForNSRange(range) : nil;3459 }3460 3461 3455 // FIXME: No reason for this to be a method instead of a function; can get document from range. 3462 3456 - (NSRange)_convertToNSRange:(const SimpleRange&)range … … 3835 3829 } 3836 3830 3831 // TextMarker attributes. 3832 3837 3833 if ([attribute isEqualToString:NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute]) { 3838 3834 return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([&rect, protectedSelf = retainPtr(self)] () -> RetainPtr<id> { … … 3868 3864 }); 3869 3865 } 3866 3867 // TextMarkerRange attributes. 3868 if ([attribute isEqualToString:@"AXTextMarkerRangeForNSRange"]) 3869 return (id)backingObject->textMarkerRangeForNSRange(range); 3870 3870 3871 3871 if ([attribute isEqualToString:NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) -
trunk/Tools/ChangeLog
r273581 r273583 1 2021-02-26 Andres Gonzalez <andresg_22@apple.com> 2 3 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 4 https://bugs.webkit.org/show_bug.cgi?id=222477 5 6 Reviewed by Chris Fleizach. 7 8 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 9 (WTR::AccessibilityUIElement::textMarkerRangeForRange): 10 1 11 2021-02-26 Aakash Jain <aakash_jain@apple.com> 2 12 -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
r273227 r273583 84 84 - (BOOL)accessibilityReplaceRange:(NSRange)range withText:(NSString *)string; 85 85 - (BOOL)accessibilityInsertText:(NSString *)text; 86 - (id)textMarkerRangeForNSRange:(const NSRange&)nsRange;87 86 - (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount; 88 87 - (NSUInteger)accessibilityIndexOfChild:(id)child; … … 1829 1828 { 1830 1829 BEGIN_AX_OBJC_EXCEPTIONS 1831 return AccessibilityTextMarkerRange::create([m_element textMarkerRangeForNSRange:NSMakeRange(location, length)]); 1830 return AccessibilityTextMarkerRange::create([m_element accessibilityAttributeValue:@"AXTextMarkerRangeForNSRange" 1831 forParameter:[NSValue valueWithRange:NSMakeRange(location, length)]]); 1832 1832 END_AX_OBJC_EXCEPTIONS 1833 1833
Note:
See TracChangeset
for help on using the changeset viewer.