[webkit-changes] [WebKit/WebKit] 1b2f16: AX: Cache the AttributedString for objects of role...

AndresGonzalezApple noreply at github.com
Fri Mar 3 07:29:50 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b2f162302f93e680fac7585ff79f1f22560cfda
      https://github.com/WebKit/WebKit/commit/1b2f162302f93e680fac7585ff79f1f22560cfda
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm

  Log Message:
  -----------
  AX: Cache the AttributedString for objects of role Tab and WebCoreLink in AXIsolatedObjects.
https://bugs.webkit.org/show_bug.cgi?id=253247
<rdar://problem/106148404>

Reviewed by Tyler Wilcock and Chris Fleizach.

In some web pages AttributedStrings are requested for ranges in objects with role Tab and WebCoreLink quite often. In this patch we cache the AttributedString for these objects considerably reducing the hit s to the main thread. Some code cleanup.

* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren const):
(WebCore::AccessibilityNodeObject::title const):
(WebCore::AccessibilityNodeObject::stringValue const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue const):
* Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm:
(WebCore::AccessibilityObject::attributedStringForTextMarkerRange const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::initializePlatformProperties):
(WebCore::AXIsolatedObject::attributedStringForTextMarkerRange const):
(WebCore::AXIsolatedObject::shouldCacheAttributedText const):

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




More information about the webkit-changes mailing list