Bug 1635722 - Check existance of proxy accessibles for pivot boundaries. r=Jamie

The new pivot boundaries might consist of accessibles that don't exist
yet in the parent process proxy tree.

I guess we can tweak the timing of the pivot boundaries message to be
sent only after remote tree construction. But this seems like an edge
case that quickly gets corrected after the next cache refresh.

Differential Revision: https://phabricator.services.mozilla.com/D85912
This commit is contained in:
Eitan Isaacson 2020-08-04 22:16:23 +00:00
Родитель bca8782a80
Коммит 8fa865b06a
1 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -26,12 +26,17 @@ mozilla::ipc::IPCResult DocAccessiblePlatformExtParent::RecvSetPivotBoundaries(
return IPC_OK();
}
AccessibleWrap* first = WrapperFor(
static_cast<DocAccessibleParent*>(aFirstDoc)->GetAccessible(aFirst));
AccessibleWrap* last = WrapperFor(
static_cast<DocAccessibleParent*>(aLastDoc)->GetAccessible(aLast));
ProxyAccessible* first =
static_cast<DocAccessibleParent*>(aFirstDoc)->GetAccessible(aFirst);
ProxyAccessible* last =
static_cast<DocAccessibleParent*>(aLastDoc)->GetAccessible(aLast);
sessionAcc->UpdateAccessibleFocusBoundaries(first, last);
// We may not have proxy accessibles available yet for those accessibles
// in the parent process.
if (first && last) {
sessionAcc->UpdateAccessibleFocusBoundaries(WrapperFor(first),
WrapperFor(last));
}
return IPC_OK();
}