Bug 1730086 part 4: Support IAccessibleText::textBefore/AfterOffset for cached RemoteAccessibles. r=morgan

Differential Revision: https://phabricator.services.mozilla.com/D137505
This commit is contained in:
James Teh 2022-02-04 02:10:29 +00:00
parent 9f17a2e0b4
commit 0862082e9c

View File

@ -219,9 +219,9 @@ ia2AccessibleText::get_textBeforeOffset(long aOffset,
*aStartOffset = *aEndOffset = 0;
*aText = nullptr;
auto [textAcc, hr] = LocalTextAcc();
HyperTextAccessibleBase* textAcc = TextAcc();
if (!textAcc) {
return hr;
return CO_E_OBJNOTCONNECTED;
}
if (!textAcc->IsValidOffset(aOffset)) return E_INVALIDARG;
@ -261,9 +261,9 @@ ia2AccessibleText::get_textAfterOffset(long aOffset,
*aEndOffset = 0;
*aText = nullptr;
auto [textAcc, hr] = LocalTextAcc();
HyperTextAccessibleBase* textAcc = TextAcc();
if (!textAcc) {
return hr;
return CO_E_OBJNOTCONNECTED;
}
if (!textAcc->IsValidOffset(aOffset)) return E_INVALIDARG;