From 6e6e4680c4000d1bb80a09e657a1bb54c55bfa24 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Fri, 2 Oct 2015 05:22:38 -0400 Subject: [PATCH] bug 1210447 - fix ProxyAccessible::EmbeddedChildAt() on proxies of outerDocs r=davidb --- accessible/ipc/ProxyAccessible.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/accessible/ipc/ProxyAccessible.cpp b/accessible/ipc/ProxyAccessible.cpp index 096ecf5cd21..4335cdef135 100644 --- a/accessible/ipc/ProxyAccessible.cpp +++ b/accessible/ipc/ProxyAccessible.cpp @@ -1000,6 +1000,14 @@ ProxyAccessible::IndexOfEmbeddedChild(const ProxyAccessible* aChild) ProxyAccessible* ProxyAccessible::EmbeddedChildAt(size_t aChildIdx) { + // For an outer doc the only child is a document, which is of course an + // embedded child. Further asking the child process for the id of the child + // document won't work because the id of the child doc will be 0, which we + // would interpret as being our parent document. + if (mOuterDoc) { + return ChildAt(aChildIdx); + } + uint64_t childID; unused << mDoc->SendEmbeddedChildAt(mID, aChildIdx, &childID); return mDoc->GetAccessible(childID);