зеркало из https://github.com/mozilla/gecko-dev.git
bug 1196460 - add method to get wrapper of proxy for document containing this proxied accessible r=surkov
This commit is contained in:
Родитель
40daa72f9b
Коммит
db584a5e09
|
@ -9,12 +9,14 @@
|
|||
|
||||
#include "Compatibility.h"
|
||||
#include "DocAccessible-inl.h"
|
||||
#include "mozilla/a11y/DocAccessibleParent.h"
|
||||
#include "EnumVariant.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsWinUtils.h"
|
||||
#include "mozilla/a11y/ProxyAccessible.h"
|
||||
#include "ProxyWrappers.h"
|
||||
#include "ServiceProvider.h"
|
||||
#include "Relation.h"
|
||||
#include "Role.h"
|
||||
|
@ -1274,6 +1276,22 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
DocProxyAccessibleWrap*
|
||||
AccessibleWrap::DocProxyWrapper() const
|
||||
{
|
||||
MOZ_ASSERT(IsProxy());
|
||||
|
||||
ProxyAccessible* proxy = Proxy();
|
||||
if (!proxy) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AccessibleWrap* acc = WrapperFor(proxy->Document());
|
||||
MOZ_ASSERT(acc->IsDoc());
|
||||
|
||||
return static_cast<DocProxyAccessibleWrap*>(acc);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// AccessibleWrap
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
class DocProxyAccessibleWrap;
|
||||
|
||||
class AccessibleWrap : public Accessible,
|
||||
public ia2Accessible,
|
||||
|
@ -183,6 +184,11 @@ protected:
|
|||
uint32_t mID;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the wrapper for the document's proxy.
|
||||
*/
|
||||
DocProxyAccessibleWrap* DocProxyWrapper() const;
|
||||
|
||||
/**
|
||||
* Creates ITypeInfo for LIBID_Accessibility if it's needed and returns it.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче