[webkit-changes] [WebKit/WebKit] caa465: AX: Avoid hitting the main thread on "AXTextMarker...

AndresGonzalezApple noreply at github.com
Thu Feb 9 09:58:40 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: caa465314d87d7a002075268a5aee09ab2c11af2
      https://github.com/WebKit/WebKit/commit/caa465314d87d7a002075268a5aee09ab2c11af2
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2023-02-09 (Thu, 09 Feb 2023)

  Changed paths:
    M LayoutTests/accessibility/mac/stale-textmarker-crash-expected.txt
    M LayoutTests/accessibility/mac/stale-textmarker-crash.html
    M LayoutTests/accessibility/mac/textmarker-for-index-out-of-bounds-crash-expected.txt
    M LayoutTests/accessibility/mac/textmarker-for-index-out-of-bounds-crash.html
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/AXTextMarker.h
    M Source/WebCore/accessibility/AXTreeStore.h
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
    M Tools/DumpRenderTree/AccessibilityUIElement.cpp
    M Tools/DumpRenderTree/AccessibilityUIElement.h
    M Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
    M Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

  Log Message:
  -----------
  AX: Avoid hitting the main thread on "AXTextMarkerIsValid" calls.
https://bugs.webkit.org/show_bug.cgi?id=251688
<rdar://problem/105005458>

Reviewed by Chris Fleizach.

Added AXTextMarker::isValid which returns true if an AX object can be obtained from the TextMarker.
Since the objects can be either isolated or not, several changes were required to AXTreeStore, including separating the collections of live and isolated trees. Now an isolated tree has the same ID as the AXObjectCache that created it.
In addition, added the distinction between an TextMarker being null or valid, and adjusted related tests and WTR AX JS interface accordingly.
Some code cleanup and renaming.

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




More information about the webkit-changes mailing list