[webkit-changes] [WebKit/WebKit] 893952: AX: Move the AttributedString for TextMarkerRange ...

AndresGonzalezApple noreply at github.com
Fri Feb 24 11:07:19 PST 2023


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

  Changed paths:
    M LayoutTests/accessibility/element-line-rects-and-text.html
    M LayoutTests/accessibility/native-text-control-attributed-string-expected.txt
    M LayoutTests/platform/mac/accessibility/content-editable-as-textarea-expected.txt
    M LayoutTests/platform/mac/accessibility/element-line-rects-and-text-expected.txt
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/AccessibilityObjectInterface.h
    A Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm
    M Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
    M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.h
    M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    R Source/WebCore/accessibility/mac/AccessibilityObjectBase.mm
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: Move the AttributedString for TextMarkerRange functionality out of the wrapper into the AXCoreObject implementation so that it can be cached in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=252193
<rdar://problem/105416277>

Reviewed by Chris Fleizach.

NSAttrbutedString for a given TextMarkerRange functionality was implemented in the AX object platform wrapper code. There was code duplication in the Mac and IOS implementations and some outdated code. this patch does the following:
- Moves this functionality implementation out of the wrappers into the AXObject implementation.
- Reuses some common code for Mac and iOS in AccessibilityObjectCocoa.mm.
- Keeps the platform specific code in AccessibilityObjectMac and IOS.mm respectively.
- Lots of code cleanup and strengthening.
There is a follow up patch that will move most of the AttributedString creation and modification functions into an AXAttributedStringBuilder class to be used in both Mac and iOS.
This is a prequel to a change to cache the AttributedString for some types of AX objects in ITM and therfore reduce main thread hits to serve these client requests.

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




More information about the webkit-changes mailing list