Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 299896402ebb2cd20dbac0f554a7ca6f2118bfc5
      
https://github.com/WebKit/WebKit/commit/299896402ebb2cd20dbac0f554a7ca6f2118bfc5
  Author: Tyler Wilcock <tyle...@apple.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
    M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: WebAccessibilityObjectWrapperMac and AXIsolatedTree do many unnecessary 
isMainThread() calls
https://bugs.webkit.org/show_bug.cgi?id=270866
rdar://problem/124468129

Reviewed by Andres Gonzalez.

Many of our hottest codepaths (various wrapper functions, 
AXIsolatedTree::{objectForID, applyPendingChanges})
call isMainThread() either completely unnecessarily (i.e. in the case of the 
AXIsolatedTree functions), or
more than necessary. These show up in samples.

This patch downgrades the isMainThread() checks in 
AXIsolatedTree::{objectForID, applyPendingChanges} to ASSERT,
as no codepath exists for these to be called on the main-thread.

This patch also removes unnecessary calls to axBackingObject in 
WebAccessibilityObjectWrapperMac and instead
passes a single RefPtr object around (which can also be more correct, i.e. 
https://bugs.webkit.org/show_bug.cgi?id=267786).

Furthermore, -[WebAccessibilityObjectWrapper 
accessibilityPresenterProcessIdentifier] now directly calls 
presentingApplicationPID(),
rather than getting axBackingObject first and calling 
presentingApplicationPID() on that.

* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::processID const): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::detachRemoteParts):
(WebCore::AXIsolatedObject::updateBackingStore):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::objectForID const):
(WebCore::AXIsolatedTree::applyPendingChanges):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::processID const): Deleted.
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXPostNotificationWithUserInfo):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _additionalAccessibilityAttributeNames:]):
(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper _associatedPluginParent]):
(-[WebAccessibilityObjectWrapper _associatedPluginParentWith:]):
(-[WebAccessibilityObjectWrapper _isEmptyGroup:]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityPresenterProcessIdentifier]):
(-[WebAccessibilityObjectWrapper 
accessibilityArrayAttributeValues:index:maxCount:]):
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): 
Deleted.
(-[WebAccessibilityObjectWrapper associatedPluginParent]): Deleted.
(-[WebAccessibilityObjectWrapper isEmptyGroup]): Deleted.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to