mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1210549 - Fix AccessibleWrap::GetXPAccessibleFor for proxied accessibles r=tbsaunde
This commit is contained in:
parent
ab37f2b8a2
commit
f8dd54d3ca
@ -1514,7 +1514,7 @@ AccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
||||
#endif
|
||||
|
||||
// If it is a document then just return an accessible.
|
||||
if (IsDoc())
|
||||
if (child && IsDoc())
|
||||
return child;
|
||||
|
||||
// Otherwise check whether the accessible is a child (this path works for
|
||||
@ -1534,8 +1534,15 @@ AccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
||||
if (IsProxy()) {
|
||||
DocAccessibleParent* proxyDoc = Proxy()->Document();
|
||||
AccessibleWrap* wrapper = GetProxiedAccessibleInSubtree(proxyDoc, id);
|
||||
if (!wrapper)
|
||||
return nullptr;
|
||||
|
||||
MOZ_ASSERT(wrapper->IsProxy());
|
||||
|
||||
if (proxyDoc == this->Proxy()) {
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
ProxyAccessible* parent = wrapper->Proxy();
|
||||
while (parent && parent != proxyDoc) {
|
||||
if (parent == this->Proxy()) {
|
||||
@ -1570,6 +1577,16 @@ AccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (doc == this) {
|
||||
AccessibleWrap* proxyWrapper =
|
||||
GetProxiedAccessibleInSubtree(remoteDocs->ElementAt(i), id);
|
||||
if (proxyWrapper) {
|
||||
return proxyWrapper;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Accessible* parent = outerDoc;
|
||||
while (parent && parent != doc) {
|
||||
if (parent == this) {
|
||||
|
Loading…
Reference in New Issue
Block a user