RESOLVED FIXED 244746
AX: Stop unnecessarily caching AXPropertyName::{LayoutCount, PressedIsPresent, DropEffects, ClickPoint, ClassList}
https://bugs.webkit.org/show_bug.cgi?id=244746
Summary AX: Stop unnecessarily caching AXPropertyName::{LayoutCount, PressedIsPresent...
Tyler Wilcock
Reported 2022-09-02 18:30:18 PDT
We only expect these properties to be requested by tests and automation on the Mac (so not actual AX clients), so don't do the work to cache them.
Attachments
Patch (19.13 KB, patch)
2022-09-02 18:32 PDT, Tyler Wilcock
no flags
Patch (19.10 KB, patch)
2022-09-02 19:57 PDT, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2022-09-02 18:30:36 PDT
Tyler Wilcock
Comment 2 2022-09-02 18:32:53 PDT
chris fleizach
Comment 3 2022-09-02 19:33:22 PDT
Comment on attachment 462108 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=462108&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:3150 > + for (unsigned k = 0; k < domClassList.length(); k++) Can we put length outside the loop to reduce number of times it is called > Source/WebCore/accessibility/AccessibilityObject.cpp:3151 > + classList.append(domClassList.item(k).string()); Is there some existing map function that does this?
Tyler Wilcock
Comment 4 2022-09-02 19:57:56 PDT
Tyler Wilcock
Comment 5 2022-09-02 19:59:08 PDT
(In reply to chris fleizach from comment #3) > Comment on attachment 462108 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=462108&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:3150 > > + for (unsigned k = 0; k < domClassList.length(); k++) > > Can we put length outside the loop to reduce number of times it is called Fixed. > > Source/WebCore/accessibility/AccessibilityObject.cpp:3151 > > + classList.append(domClassList.item(k).string()); > > Is there some existing map function that does this? Unfortunately no. This is a DOMTokenList class rather than a Vector, and it doesn't have a map function.
EWS
Comment 6 2022-09-03 10:13:13 PDT
Committed 254130@main (1ee82a09fde8): <https://commits.webkit.org/254130@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462111 [details].
Note You need to log in before you can comment on or make changes to this bug.