Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b2f162302f93e680fac7585ff79f1f22560cfda
      
https://github.com/WebKit/WebKit/commit/1b2f162302f93e680fac7585ff79f1f22560cfda
  Author: Andres Gonzalez <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to