RESOLVED FIXED256238
AX: Avoid hitting the main thread in [WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames] in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=256238
Summary AX: Avoid hitting the main thread in [WKAccessibilityWebPageObject accessibil...
Andres Gonzalez
Reported 2023-05-02 17:43:41 PDT
this method is hitting the main thread during page load.
Attachments
Patch (5.68 KB, patch)
2023-05-02 17:56 PDT, Andres Gonzalez
no flags
Patch (5.84 KB, patch)
2023-05-03 10:19 PDT, Andres Gonzalez
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2023-05-02 17:43:56 PDT
Andres Gonzalez
Comment 2 2023-05-02 17:56:02 PDT
Tyler Wilcock
Comment 3 2023-05-02 18:02:33 PDT
Comment on attachment 466184 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466184&action=review > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:93 > + m_parameterizedAttributeNames = createNSArray(corePage->pageOverlayController().copyAccessibilityAttributesNames(true)); PageOverlayController uses PageOverlayController::m_pageOverlays in copyAccessibilityAttributesNames, and m_pageOverlays can change. Do we need to update this value when that happens?
Andres Gonzalez
Comment 4 2023-05-03 10:19:53 PDT
Andres Gonzalez
Comment 5 2023-05-03 10:28:14 PDT
(In reply to Tyler Wilcock from comment #3) > Comment on attachment 466184 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=466184&action=review > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:93 > > + m_parameterizedAttributeNames = createNSArray(corePage->pageOverlayController().copyAccessibilityAttributesNames(true)); > > PageOverlayController uses PageOverlayController::m_pageOverlays in > copyAccessibilityAttributesNames, and m_pageOverlays can change. Do we need > to update this value when that happens? Added a FIXME concerning this, but this was not being updated before and it didn't cause any problem that we know of. Attribute names should not change much at all, and their importance is rather low because a client can query for any attribute whether it is returned here or not. In fact, this API is deprecated altogether since it only serves a purpose for discoverability but nothing else.
Tyler Wilcock
Comment 6 2023-05-03 10:34:12 PDT
(In reply to Andres Gonzalez from comment #5) > (In reply to Tyler Wilcock from comment #3) > > Comment on attachment 466184 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=466184&action=review > > > > > Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:93 > > > + m_parameterizedAttributeNames = createNSArray(corePage->pageOverlayController().copyAccessibilityAttributesNames(true)); > > > > PageOverlayController uses PageOverlayController::m_pageOverlays in > > copyAccessibilityAttributesNames, and m_pageOverlays can change. Do we need > > to update this value when that happens? > > Added a FIXME concerning this, but this was not being updated before and it > didn't cause any problem that we know of. Attribute names should not change > much at all, and their importance is rather low because a client can query > for any attribute whether it is returned here or not. In fact, this API is > deprecated altogether since it only serves a purpose for discoverability but > nothing else. Ah, I missed that we were already caching these ones. Sounds good, thanks!
EWS
Comment 7 2023-05-03 11:59:42 PDT
Committed 263642@main (d68576bd2062): <https://commits.webkit.org/263642@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 466194 [details].
Note You need to log in before you can comment on or make changes to this bug.