Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e19b5bf8775e72c670c07b8bccba4f74b2fb9057
      
https://github.com/WebKit/WebKit/commit/e19b5bf8775e72c670c07b8bccba4f74b2fb9057
  Author: Tyler Wilcock <[email protected]>
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
    A 
LayoutTests/accessibility/ax-thread-text-apis/range-for-line-index-expected.txt
    A LayoutTests/accessibility/ax-thread-text-apis/range-for-line-index.html
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm

  Log Message:
  -----------
  AX: Implement support for serving AXRangeForLine off the main-thread
https://bugs.webkit.org/show_bug.cgi?id=269752
rdar://problem/123266666

Reviewed by Andres Gonzalez.

This patch implements off-main-thread support for AXRangeForLine. Test 
range-for-line-index.html
was ported to the ax-thread-text-apis to verify we are following the correct 
behavior.

This test exposed a bug in this configuration: the text inside input elements 
is not part of the
accessibility tree, and thus was not included in any text run traversal and 
processing. This is
rectified by changing AccessibilityRenderObject::textRuns() to gather this 
text. This is significant
because it modifies an assumption that the code previously had: any object that 
held text runs was
a leaf (had no children). This is now not true for inputs, which have one child 
(their inner
contenteditable in the UA shadow tree). As such, AXTextMarker::isInTextLeaf has 
been renamed to
AXTextMarker::isInTextRun, and AXTextMarker::toTextLeafMarker has been renamed 
to
AXTextMarker::toTextRunMarker.

* 
LayoutTests/accessibility/ax-thread-text-apis/range-for-line-index-expected.txt:
 Added.
* LayoutTests/accessibility/ax-thread-text-apis/range-for-line-index.html: 
Added.
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::lineID const):
(WebCore::AXTextMarker::lineIndex const):
(WebCore::AXTextMarker::rangeForLine const):
(WebCore::AXTextMarker::offsetFromRoot const):
(WebCore::AXTextMarker::nextMarkerFromOffset const):
(WebCore::AXTextMarker::findLastBefore const):
(WebCore::AXTextMarkerRange::toString const):
(WebCore::AXTextMarker::findMarker const):
(WebCore::AXTextMarker::toTextRunMarker const):
(WebCore::AXTextMarker::isInTextRun const):
(WebCore::AXTextMarker::toTextLeafMarker const): Deleted.
(WebCore::AXTextMarker::isInTextLeaf const): Deleted.
* Source/WebCore/accessibility/AXTextMarker.h:
(WebCore::AXTextMarker::previousLineStart const):
(WebCore::AXTextMarker::nextLineEnd const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textRuns):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::sibling const):
(WebCore::AXIsolatedObject::siblingOrParent const):
(WebCore::AXIsolatedObject::doAXRangeForLine const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::textMarkerRange const):

Canonical link: https://commits.webkit.org/275050@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to