Bug 253796 - AX: Reduce main-thread hits for descriptionAttributeValue, titleAttributeValue, and accessibilityHitTest
Summary: AX: Reduce main-thread hits for descriptionAttributeValue, titleAttributeValu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-12 12:50 PDT by Tyler Wilcock
Modified: 2023-03-14 11:14 PDT (History)
3 users (show)

See Also:


Attachments
Patch (8.93 KB, patch)
2023-03-12 13:08 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (8.97 KB, patch)
2023-03-12 13:46 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (8.97 KB, patch)
2023-03-12 17:19 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-03-12 12:50:16 PDT
For AccessibilityRole::StaticText objects, descriptionAttributeValue and titleAttributeValue are hardcoded to return empty string. We know an object's role value before going to the main-thread, so let's use this information. Also, accessibilityHitTest goes to the main-thread to access AXCoreObject::widget without checking AXCoreObject::isWidget first, which incurs unnecessary main-thread hits for things that are not widgets.
Comment 1 Radar WebKit Bug Importer 2023-03-12 12:50:25 PDT
<rdar://problem/106619115>
Comment 2 Tyler Wilcock 2023-03-12 13:08:55 PDT
Created attachment 465404 [details]
Patch
Comment 3 Tyler Wilcock 2023-03-12 13:46:55 PDT
Created attachment 465405 [details]
Patch
Comment 4 Tyler Wilcock 2023-03-12 17:19:35 PDT
Created attachment 465410 [details]
Patch
Comment 5 EWS 2023-03-14 11:14:45 PDT
Committed 261642@main (9d4124105e23): <https://commits.webkit.org/261642@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465410 [details].