bug 1192353 - make HyperTextProxyAccessibleWrap inherit from

HyperTextAccessibleWrap r=davidb

This is rather unfortunate, AccessibleWrap itself wastes a fair amount of space
when it just stores a pointer to a proxy, and this makes it waste even more.
However this is rather necessary for now because we need to be able to downcast
classes such as ia2AccessibleText to one type that works both when the
accessible is pointing to a proxy and when it is not.  That means
HyperTextAccessibleWrap and HyperTextProxyAccessibleWrap need to have the same
layout.
This commit is contained in:
Trevor Saunders 2015-08-07 14:22:52 -04:00
parent 1fd2102b9b
commit ae892e0614

View File

@ -29,12 +29,16 @@ class ProxyAccessibleWrap : public AccessibleWrap
}
};
class HyperTextProxyAccessibleWrap : public ProxyAccessibleWrap,
public ia2AccessibleEditableText,
public ia2AccessibleHypertext
class HyperTextProxyAccessibleWrap : public HyperTextAccessibleWrap
{
HyperTextProxyAccessibleWrap(ProxyAccessible* aProxy) :
ProxyAccessibleWrap(aProxy) {}
HyperTextAccessibleWrap(nullptr, nullptr)
{
mType = eProxyType;
mBits.proxy = aProxy;
}
virtual void Shutdown() override { mBits.proxy = nullptr; }
};
template<typename T>