this method is hitting the main thread during page load.
<rdar://problem/108818952>
Created attachment 466184 [details] Patch
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?
Created attachment 466194 [details] Patch
(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.
(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!
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].