Bug 1187413 - Check for ProxyAccessible in mozAccessible childAt r=tbsaunde

This commit is contained in:
Lorien Hu 2015-07-26 10:30:56 -04:00
parent 7239355f23
commit 907dd771b0

View File

@ -355,10 +355,12 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
{ {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL; NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
AccessibleWrap* accWrap = [self getGeckoAccessible]; if (AccessibleWrap* accWrap = [self getGeckoAccessible]) {
if (accWrap) { Accessible* child = accWrap->GetChildAt(i);
Accessible* acc = accWrap->GetChildAt(i); return child ? GetNativeFromGeckoAccessible(child) : nil;
return acc ? GetNativeFromGeckoAccessible(acc) : nil; } else if (ProxyAccessible* proxy = [self getProxyAccessible]) {
ProxyAccessible* child = proxy->ChildAt(i);
return child ? GetNativeFromProxy(child) : nil;
} }
return nil; return nil;