[webkit-changes] [WebKit/WebKit] 1771ff: AX: Implement AccessibilityRenderObject::textRuns()
Tyler Wilcock
noreply at github.com
Wed Dec 6 10:22:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1771ffce4f5ec12bc9a7841a5389c756897ca554
https://github.com/WebKit/WebKit/commit/1771ffce4f5ec12bc9a7841a5389c756897ca554
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-12-06 (Wed, 06 Dec 2023)
Changed paths:
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/layout/integration/inline/InlineIteratorBox.h
M Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h
M Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h
Log Message:
-----------
AX: Implement AccessibilityRenderObject::textRuns()
https://bugs.webkit.org/show_bug.cgi?id=265823
rdar://problem/119153805
Reviewed by Alan Baradlay.
This patch implements AccessibilityRenderObject::textRuns() by iterating
the inline box tree and retrieving lines of text and their associated line
indices.
Using this information, we should then be able to traverse the off-main-thread
accessibility tree and use the associated text for each node to service APIs
like AXNextLineEndTextMarkerForTextMarker and AXPreviousLineStartTextMarkerForTextMarker.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textRuns):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
Fix a bug where we only computed AXPropertyName::TextRuns for text
controls, which excludes other important objects like those associated with RenderTexts.
* Source/WebCore/layout/integration/inline/InlineIteratorBox.h:
(WebCore::InlineIterator::Box::lineIndex const): Added.
* Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h:
(WebCore::InlineIterator::BoxLegacyPath::lineIndex const): Added.
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::lineIndex const): Added.
Canonical link: https://commits.webkit.org/271617@main
More information about the webkit-changes
mailing list