[webkit-changes] [WebKit/WebKit] b19f77: AX: When isolated tree mode is enabled, we should ...
Tyler Wilcock
noreply at github.com
Sat Jul 8 16:42:28 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b19f7742cb0c156ce79b3eba744b5a0407de0a02
https://github.com/WebKit/WebKit/commit/b19f7742cb0c156ce79b3eba744b5a0407de0a02
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-07-08 (Sat, 08 Jul 2023)
Changed paths:
M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Log Message:
-----------
AX: When isolated tree mode is enabled, we should never eagerly spellcheck (except for testing)
https://bugs.webkit.org/show_bug.cgi?id=259016
rdar://problem/111958889
Reviewed by Chris Fleizach.
In https://bugs.webkit.org/show_bug.cgi?id=256629, we added the ability to defer spellchecking when the requesting
client is VoiceOver. This works well when isolated tree mode is disabled, since the only time we would decide whether
to eagerly spellcheck or not is in direct response to an assistive technology request.
However, isolated tree mode does work to update the tree outside of direct AT requests (e.g. from AXObjectCache::performDeferredCacheUpdate),
meaning _AXGetClientForCurrentRequestUntrusted is not set. In turn, this means we eagerly spellcheck when caching
attributed strings, which is a huge performance hit.
With this patch, AXObjectCache::shouldSpellCheck() now returns false if isolated tree mode is enabled. We may eventually
want some abstraction on top of _AXGetClientForCurrentRequestUntrusted, like caching the last AT we talked to, as that
would work here too.
This saves 14k of 65k samples on a document editing website.
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::isTestAXClientType):
(WebCore::AXObjectCache::isTestClient):
(WebCore::AXObjectCache::shouldSpellCheck):
Canonical link: https://commits.webkit.org/265883@main
More information about the webkit-changes
mailing list