Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 53474a4c1fcc8f6353cf7cda29f939d1ddf7334b
      
https://github.com/WebKit/WebKit/commit/53474a4c1fcc8f6353cf7cda29f939d1ddf7334b
  Author: Andres Gonzalez <[email protected]>
  Date:   2024-04-19 (Fri, 19 Apr 2024)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: Move code that belongs to AccessibilityObject::rolePlatformString, 
subrolePlatformString and roleDescription out of the wrapper.
https://bugs.webkit.org/show_bug.cgi?id=272949
<rdar://problem/126726923>

Reviewed by Tyler Wilcock.

The code to return the role and subrole platform strings, as well as the role 
description, was split between the WebAccessibilityObjectWrapper and 
AccessibilityObject implementations. This patch moves most of that code into 
the latter making the Mac wrapper for these APIs thinner.

More importantly, this change avoids some hits to the main thread in 
renderWidgetChildren when called on the AX thread from subrolePlatformString. 
It also avoids calling [WebAccessibilityObjectWrapper axBackingObject] 
unnecessarily for these APIs.

* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIARoleDescription const):
(WebCore::AccessibilityObject::roleDescription const):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::rolePlatformString const):
(WebCore::isEmptyGroup):
(WebCore::renderWidgetChildren):
(WebCore::AccessibilityObject::subrolePlatformString const):
(WebCore::AccessibilityObject::rolePlatformDescription const):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(roleString):
(subroleString):
(roleDescription):
(-[WebAccessibilityObjectWrapper _transformSpecialChildrenCases:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper renderWidgetChildren]): Deleted.
(-[WebAccessibilityObjectWrapper role]): Deleted.
(-[WebAccessibilityObjectWrapper _isEmptyGroup:]): Deleted.
(-[WebAccessibilityObjectWrapper subrole]): Deleted.
(-[WebAccessibilityObjectWrapper roleDescription]): Deleted.

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



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

Reply via email to