Bug 253289

Summary: AX: Remove boundingBoxRect and computedLabel from the AXCoreObject interface
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Tyler Wilcock
Reported 2023-03-02 18:29:25 PST
These functions are only necessary for AccessibilityObjects, not AXIsolatedObjects.
Attachments
Patch (14.07 KB, patch)
2023-03-02 18:43 PST, Tyler Wilcock
no flags
Patch (11.66 KB, patch)
2023-03-03 00:56 PST, Tyler Wilcock
no flags
Patch (11.80 KB, patch)
2023-03-03 10:00 PST, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2023-03-02 18:29:35 PST
Tyler Wilcock
Comment 2 2023-03-02 18:43:19 PST
Tyler Wilcock
Comment 3 2023-03-03 00:56:54 PST
Andres Gonzalez
Comment 4 2023-03-03 07:10:22 PST
(In reply to Tyler Wilcock from comment #3) > Created attachment 465275 [details] > Patch Also make uses of `performFunctionOnMainThread` typed with `AccessibilityObject*` instead of `AXCoreObject*`. "make uses" -> "make use" or "uses". --- a/Source/WebCore/accessibility/AccessibilityObject.h +++ b/Source/WebCore/accessibility/AccessibilityObject.h - String computedLabel() override; + WEBCORE_EXPORT String computedLabel(); Why it needs WEBCORE_EXPORT, it didn't before in AXCoreObject. - LayoutRect boundingBoxRect() const override { return LayoutRect(); } + virtual LayoutRect boundingBoxRect() const { return LayoutRect(); } return { }; --- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp +++ b/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Missing space between ]( void AXIsolatedObject::setSelected(bool value) { - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Dito. void AXIsolatedObject::setSelectedRows(AccessibilityChildrenVector& value) { - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Dito. void AXIsolatedObject::setFocused(bool value) { - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Dito. void AXIsolatedObject::setSelectedText(const String& value) { - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Dito. void AXIsolatedObject::setSelectedTextRange(const PlainTextRange& value) { - performFunctionOnMainThread([&value](AXCoreObject* object) { + performFunctionOnMainThread([&value](AccessibilityObject* object) { Dito. void AXIsolatedObject::increment() { - performFunctionOnMainThread([](AXCoreObject* axObject) { + performFunctionOnMainThread([](AccessibilityObject* axObject) { Dito. void AXIsolatedObject::decrement() { - performFunctionOnMainThread([](AXCoreObject* axObject) { + performFunctionOnMainThread([](AccessibilityObject* axObject) { Dito.
Tyler Wilcock
Comment 5 2023-03-03 10:00:34 PST
Tyler Wilcock
Comment 6 2023-03-03 10:04:33 PST
(In reply to Andres Gonzalez from comment #4) > (In reply to Tyler Wilcock from comment #3) > > Created attachment 465275 [details] > > Patch > > --- a/Source/WebCore/accessibility/AccessibilityObject.h > +++ b/Source/WebCore/accessibility/AccessibilityObject.h > > - String computedLabel() override; > + WEBCORE_EXPORT String computedLabel(); > > Why it needs WEBCORE_EXPORT, it didn't before in AXCoreObject. I'm not entirely sure. Before my patch the function was virtual, which may have implicitly exposed it. Without WEBCORE_EXPORT, we fail to link because WebProcess/Automation/WebAutomationSessionProxy.cpp calls `computedLabel()`.
EWS
Comment 7 2023-03-03 20:45:25 PST
Committed 261210@main (aa13aa32a983): <https://commits.webkit.org/261210@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465282 [details].
Note You need to log in before you can comment on or make changes to this bug.