[webkit-changes] [WebKit/WebKit] faa4b2: AX: ENABLE(AX_THREAD_TEXT_APIS) should utilize ign...

Tyler Wilcock noreply at github.com
Mon Jan 6 11:29:04 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: faa4b20a62f299f89f135366fcaafc1e181e0122
      https://github.com/WebKit/WebKit/commit/faa4b20a62f299f89f135366fcaafc1e181e0122
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2025-01-06 (Mon, 06 Jan 2025)

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.cpp
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm

  Log Message:
  -----------
  AX: ENABLE(AX_THREAD_TEXT_APIS) should utilize ignored objects provided by ENABLE(INCLUDE_IGNORED_IN_CORE_AX_TREE)
https://bugs.webkit.org/show_bug.cgi?id=285219
rdar://142126734

Reviewed by Chris Fleizach.

ENABLE(INCLUDE_IGNORED_IN_CORE_AX_TREE) gives us access to ignored objects in ENABLE(AX_THREAD_TEXT_APIS), and with this
commit we make use of them. This lets us remove several hacks, like considering white-space only RenderText or br-element
renderers unignored only in ENABLE(INCLUDE_IGNORED_IN_CORE_AX_TREE). This also fixes a couple layout tests with ENABLE(AX_THREAD_TEXT_APIS),
and gives the necessary foundation to fix even more.

This patch also refactors AXProperty::{HasBodyTag, HasMarkTag} into a new AXProperty::TagName. This lets us more easily
add new interesting tag names we need off the main-thread (which we will have a need for in future patches).

* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::previousInPreOrder):
(WebCore::AXCoreObject::deepestLastChildIncludingIgnored):
(WebCore::AXCoreObject::previousSiblingIncludingIgnored):
(WebCore::AXCoreObject::nextSiblingIncludingIgnoredOrParent const):
(WebCore::AXCoreObject::isReplacedElement const):
(WebCore::AXCoreObject::nextUnignoredSiblingOrParent const): Deleted.
* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::characterRangeForLine const):
(WebCore::AXTextMarker::lineNumberForIndex const):
(WebCore::Accessibility::findObjectWithRuns):
(WebCore::appendChildren): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsRangeValue const):
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeIsIgnored const):
(WebCore::AccessibilityRenderObject::textRuns):
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::textMarkerRange const):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list