bug 1196880 - correctly compute interfaces for proxies r=davidb

interfaces is supposed to be a bit mask indexed by MAI_INTERFACE_X, so when
adding interfaces MAI_INTERFACE_X should be used as an index of the bit to set,
       not the mask to add.
This commit is contained in:
Trevor Saunders 2015-08-20 15:38:37 -04:00
parent 23f350eb4a
commit 1605394bcb

View File

@ -1089,19 +1089,19 @@ GetInterfacesForProxy(ProxyAccessible* aProxy, uint32_t aInterfaces)
| (1 << MAI_INTERFACE_EDITABLE_TEXT);
if (aInterfaces & Interfaces::HYPERLINK)
interfaces |= MAI_INTERFACE_HYPERLINK_IMPL;
interfaces |= 1 << MAI_INTERFACE_HYPERLINK_IMPL;
if (aInterfaces & Interfaces::VALUE)
interfaces |= MAI_INTERFACE_VALUE;
interfaces |= 1 << MAI_INTERFACE_VALUE;
if (aInterfaces & Interfaces::TABLE)
interfaces |= MAI_INTERFACE_TABLE;
interfaces |= 1 << MAI_INTERFACE_TABLE;
if (aInterfaces & Interfaces::IMAGE)
interfaces |= MAI_INTERFACE_IMAGE;
interfaces |= 1 << MAI_INTERFACE_IMAGE;
if (aInterfaces & Interfaces::DOCUMENT)
interfaces |= MAI_INTERFACE_DOCUMENT;
interfaces |= 1 << MAI_INTERFACE_DOCUMENT;
return interfaces;
}