bug 1196460 - provide mapping from id to accessible in DocProxyAccessibleWrap

This commit is contained in:
Trevor Saunders 2015-08-11 17:01:01 -04:00
parent 06230447cd
commit e354c96e5b

View File

@ -48,6 +48,18 @@ public:
DocProxyAccessibleWrap(ProxyAccessible* aProxy) : DocProxyAccessibleWrap(ProxyAccessible* aProxy) :
HyperTextProxyAccessibleWrap(aProxy) HyperTextProxyAccessibleWrap(aProxy)
{ mGenericTypes |= eDocument; } { mGenericTypes |= eDocument; }
void AddID(uint32_t aID, AccessibleWrap* aAcc)
{ mIDToAccessibleMap.Put(aID, aAcc); }
void RemoveID(uint32_t aID) { mIDToAccessibleMap.Remove(aID); }
AccessibleWrap* GetAccessibleByID(uint32_t aID) const
{ return mIDToAccessibleMap.Get(aID); }
private:
/*
* This provides a mapping from 32 bit id to accessible objects.
*/
nsDataHashtable<nsUint32HashKey, AccessibleWrap*> mIDToAccessibleMap;
}; };
template<typename T> template<typename T>