bug 1215657 - make AccessibleWrap::get_accSelection work with proxies r=davidb

This commit is contained in:
Trevor Saunders 2015-10-16 15:23:26 -04:00
parent c78db0bac2
commit bde12e1837

View File

@ -833,7 +833,17 @@ AccessibleWrap::get_accSelection(VARIANT __RPC_FAR *pvarChildren)
if (IsSelect()) {
nsAutoTArray<Accessible*, 10> selectedItems;
SelectedItems(&selectedItems);
if (IsProxy()) {
nsTArray<ProxyAccessible*> proxies;
Proxy()->SelectedItems(&proxies);
uint32_t selectedCount = proxies.Length();
for (uint32_t i = 0; i < selectedCount; i++) {
selectedItems.AppendElement(WrapperFor(proxies[i]));
}
} else {
SelectedItems(&selectedItems);
}
// 1) Create and initialize the enumeration
RefPtr<AccessibleEnumerator> pEnum = new AccessibleEnumerator(selectedItems);