Title: [268831] branches/safari-610-branch/Source/WebCore
- Revision
- 268831
- Author
- alanc...@apple.com
- Date
- 2020-10-21 15:15:49 -0700 (Wed, 21 Oct 2020)
Log Message
Cherry-pick r268084. rdar://problem/70541921
AX: Expose lineRangeForPosition for iOS Accessibility code
https://bugs.webkit.org/show_bug.cgi?id=217256
<rdar://problem/67478962>
Reviewed by Zalan Bujtas.
Expose the existing lineRangeForPosition method for iOS accessibility.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper lineMarkersForMarker:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (268830 => 268831)
--- branches/safari-610-branch/Source/WebCore/ChangeLog 2020-10-21 22:15:45 UTC (rev 268830)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog 2020-10-21 22:15:49 UTC (rev 268831)
@@ -1,5 +1,36 @@
2020-10-21 Russell Epstein <repst...@apple.com>
+ Cherry-pick r268084. rdar://problem/70541921
+
+ AX: Expose lineRangeForPosition for iOS Accessibility code
+ https://bugs.webkit.org/show_bug.cgi?id=217256
+ <rdar://problem/67478962>
+
+ Reviewed by Zalan Bujtas.
+
+ Expose the existing lineRangeForPosition method for iOS accessibility.
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper lineMarkersForMarker:]):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-06 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: Expose lineRangeForPosition for iOS Accessibility code
+ https://bugs.webkit.org/show_bug.cgi?id=217256
+ <rdar://problem/67478962>
+
+ Reviewed by Zalan Bujtas.
+
+ Expose the existing lineRangeForPosition method for iOS accessibility.
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper lineMarkersForMarker:]):
+
+2020-10-21 Russell Epstein <repst...@apple.com>
+
Cherry-pick r266787. rdar://problem/70541715
AccessibilityMenuList and MenuListPopup notifications need to be posted asynchronously.
Modified: branches/safari-610-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (268830 => 268831)
--- branches/safari-610-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2020-10-21 22:15:45 UTC (rev 268830)
+++ branches/safari-610-branch/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2020-10-21 22:15:49 UTC (rev 268831)
@@ -2675,6 +2675,24 @@
return [WebAccessibilityTextMarker textMarkerWithVisiblePosition:lineEnd cache:self.axBackingObject->axObjectCache()];
}
+// Returns start/end markers for the line based on position
+- (NSArray<WebAccessibilityTextMarker *> *)lineMarkersForMarker:(WebAccessibilityTextMarker *)marker
+{
+ if (![self _prepareAccessibilityCall])
+ return nil;
+
+ if (!marker)
+ return nil;
+
+ auto range = self.axBackingObject->lineRangeForPosition([marker visiblePosition]);
+ auto* startMarker = [WebAccessibilityTextMarker textMarkerWithVisiblePosition:range.start cache:self.axBackingObject->axObjectCache()];
+ auto* endMarker = [WebAccessibilityTextMarker textMarkerWithVisiblePosition:range.end cache:self.axBackingObject->axObjectCache()];
+ if (!startMarker || !endMarker)
+ return nil;
+
+ return @[ startMarker, endMarker ];
+}
+
// This method is intended to return the marker at the start of the line starting at
// the marker that is passed into the method.
- (WebAccessibilityTextMarker *)lineStartMarkerForMarker:(WebAccessibilityTextMarker *)marker
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes