From e354c96e5be501b24a51291b63cc964785c4a5bd Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Tue, 11 Aug 2015 17:01:01 -0400 Subject: [PATCH] bug 1196460 - provide mapping from id to accessible in DocProxyAccessibleWrap --- accessible/windows/ProxyWrappers.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/accessible/windows/ProxyWrappers.h b/accessible/windows/ProxyWrappers.h index 4e14d172d43..2394f35e6b2 100644 --- a/accessible/windows/ProxyWrappers.h +++ b/accessible/windows/ProxyWrappers.h @@ -48,6 +48,18 @@ public: DocProxyAccessibleWrap(ProxyAccessible* aProxy) : HyperTextProxyAccessibleWrap(aProxy) { 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 mIDToAccessibleMap; }; template