Changeset 273801 in webkit
- Timestamp:
- Mar 2, 2021, 7:09:17 PM (6 years ago)
- Location:
- branches/safari-612.1.5-branch
- 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
-
branches/safari-612.1.5-branch/Source/WebCore/ChangeLog
r273800 r273801 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273583. rdar://problem/74953376 4 5 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 6 https://bugs.webkit.org/show_bug.cgi?id=222477 7 Source/WebCore: 8 9 <rdar://problem/74793445> 10 11 Reviewed by Chris Fleizach. 12 13 This is a follow up to: https://bugs.webkit.org/show_bug.cgi?id=222154. 14 As Chris Fleizach pointed out in the above review, it is necessary to 15 add a handler in accessibilityAttributeValue:forParameter: for a new AX 16 attribute in order for clients to access this functionality. 17 18 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 19 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 20 (-[WebAccessibilityObjectWrapper textMarkerRangeForNSRange:]): Deleted. 21 22 Tools: 23 24 Reviewed by Chris Fleizach. 25 26 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 27 (WTR::AccessibilityUIElement::textMarkerRangeForRange): 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273583 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2021-02-26 Andres Gonzalez <andresg_22@apple.com> 33 34 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 35 https://bugs.webkit.org/show_bug.cgi?id=222477 36 <rdar://problem/74793445> 37 38 Reviewed by Chris Fleizach. 39 40 This is a follow up to: https://bugs.webkit.org/show_bug.cgi?id=222154. 41 As Chris Fleizach pointed out in the above review, it is necessary to 42 add a handler in accessibilityAttributeValue:forParameter: for a new AX 43 attribute in order for clients to access this functionality. 44 45 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 46 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 47 (-[WebAccessibilityObjectWrapper textMarkerRangeForNSRange:]): Deleted. 48 1 49 2021-03-02 Alan Coon <alancoon@apple.com> 2 50 -
branches/safari-612.1.5-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r273227 r273801 3479 3479 } 3480 3480 3481 - (AXTextMarkerRangeRef)textMarkerRangeForNSRange:(const NSRange&)range3482 {3483 auto* backingObject = self.updateObjectBackingStore;3484 return backingObject ? backingObject->textMarkerRangeForNSRange(range) : nil;3485 }3486 3487 3481 // FIXME: No reason for this to be a method instead of a function; can get document from range. 3488 3482 - (NSRange)_convertToNSRange:(const SimpleRange&)range … … 3861 3855 } 3862 3856 3857 // TextMarker attributes. 3858 3863 3859 if ([attribute isEqualToString:NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute]) { 3864 3860 return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([&rect, protectedSelf = retainPtr(self)] () -> RetainPtr<id> { … … 3894 3890 }); 3895 3891 } 3892 3893 // TextMarkerRange attributes. 3894 if ([attribute isEqualToString:@"AXTextMarkerRangeForNSRange"]) 3895 return (id)backingObject->textMarkerRangeForNSRange(range); 3896 3896 3897 3897 if ([attribute isEqualToString:NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) -
branches/safari-612.1.5-branch/Tools/ChangeLog
r273791 r273801 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273583. rdar://problem/74953376 4 5 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 6 https://bugs.webkit.org/show_bug.cgi?id=222477 7 Source/WebCore: 8 9 <rdar://problem/74793445> 10 11 Reviewed by Chris Fleizach. 12 13 This is a follow up to: https://bugs.webkit.org/show_bug.cgi?id=222154. 14 As Chris Fleizach pointed out in the above review, it is necessary to 15 add a handler in accessibilityAttributeValue:forParameter: for a new AX 16 attribute in order for clients to access this functionality. 17 18 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 19 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 20 (-[WebAccessibilityObjectWrapper textMarkerRangeForNSRange:]): Deleted. 21 22 Tools: 23 24 Reviewed by Chris Fleizach. 25 26 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 27 (WTR::AccessibilityUIElement::textMarkerRangeForRange): 28 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273583 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2021-02-26 Andres Gonzalez <andresg_22@apple.com> 33 34 Add AXTextMarkerRangeForNSRange attribute so that Mac clients can access this functionality. 35 https://bugs.webkit.org/show_bug.cgi?id=222477 36 37 Reviewed by Chris Fleizach. 38 39 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 40 (WTR::AccessibilityUIElement::textMarkerRangeForRange): 41 1 42 2021-03-02 Alan Coon <alancoon@apple.com> 2 43 -
branches/safari-612.1.5-branch/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
r273227 r273801 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.