Bug 1826242: Use the cache for RemoteAccessible::CaretOffset on non-Windows. r=nlapre

Differential Revision: https://phabricator.services.mozilla.com/D176980
This commit is contained in:
James Teh 2023-05-04 00:53:43 +00:00
parent f7a86554a1
commit 6bb1e36bb7

View File

@ -165,6 +165,10 @@ int32_t RemoteAccessible::CaretLineNumber() {
}
int32_t RemoteAccessible::CaretOffset() const {
if (StaticPrefs::accessibility_cache_enabled_AtStartup()) {
return RemoteAccessibleBase<RemoteAccessible>::CaretOffset();
}
int32_t offset = 0;
Unused << mDoc->SendCaretOffset(mID, &offset);
return offset;