Changeset 268831 in webkit
- Timestamp:
- Oct 21, 2020, 3:15:49 PM (6 years ago)
- Location:
- branches/safari-610-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610-branch/Source/WebCore/ChangeLog
r268830 r268831 1 2020-10-21 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r268084. rdar://problem/70541921 4 5 AX: Expose lineRangeForPosition for iOS Accessibility code 6 https://bugs.webkit.org/show_bug.cgi?id=217256 7 <rdar://problem/67478962> 8 9 Reviewed by Zalan Bujtas. 10 11 Expose the existing lineRangeForPosition method for iOS accessibility. 12 13 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 14 (-[WebAccessibilityObjectWrapper lineMarkersForMarker:]): 15 16 17 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268084 268f45cc-cd09-0410-ab3c-d52691b4dbfc 18 19 2020-10-06 Chris Fleizach <cfleizach@apple.com> 20 21 AX: Expose lineRangeForPosition for iOS Accessibility code 22 https://bugs.webkit.org/show_bug.cgi?id=217256 23 <rdar://problem/67478962> 24 25 Reviewed by Zalan Bujtas. 26 27 Expose the existing lineRangeForPosition method for iOS accessibility. 28 29 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 30 (-[WebAccessibilityObjectWrapper lineMarkersForMarker:]): 31 1 32 2020-10-21 Russell Epstein <repstein@apple.com> 2 33 -
branches/safari-610-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r265278 r268831 2676 2676 } 2677 2677 2678 // Returns start/end markers for the line based on position 2679 - (NSArray<WebAccessibilityTextMarker *> *)lineMarkersForMarker:(WebAccessibilityTextMarker *)marker 2680 { 2681 if (![self _prepareAccessibilityCall]) 2682 return nil; 2683 2684 if (!marker) 2685 return nil; 2686 2687 auto range = self.axBackingObject->lineRangeForPosition([marker visiblePosition]); 2688 auto* startMarker = [WebAccessibilityTextMarker textMarkerWithVisiblePosition:range.start cache:self.axBackingObject->axObjectCache()]; 2689 auto* endMarker = [WebAccessibilityTextMarker textMarkerWithVisiblePosition:range.end cache:self.axBackingObject->axObjectCache()]; 2690 if (!startMarker || !endMarker) 2691 return nil; 2692 2693 return @[ startMarker, endMarker ]; 2694 } 2695 2678 2696 // This method is intended to return the marker at the start of the line starting at 2679 2697 // the marker that is passed into the method.
Note:
See TracChangeset
for help on using the changeset viewer.