mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1243077 - add ToXPC{,Document} overloads for proxied accessibles r=davidb
This commit is contained in:
parent
1fbafdb262
commit
9ec7157cf1
@ -13,6 +13,7 @@
|
||||
#include "DocAccessible-inl.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -227,3 +228,18 @@ xpcAccessibleDocument::Shutdown()
|
||||
}
|
||||
xpcAccessibleGeneric::Shutdown();
|
||||
}
|
||||
|
||||
xpcAccessibleGeneric*
|
||||
a11y::ToXPC(AccessibleOrProxy aAcc)
|
||||
{
|
||||
if (aAcc.IsNull()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aAcc.IsAccessible()) {
|
||||
return ToXPC(aAcc.AsAccessible());
|
||||
}
|
||||
|
||||
xpcAccessibleDocument* doc = ToXPCDocument(aAcc.AsProxy()->Document());
|
||||
return doc->GetXPCAccessible(aAcc.AsProxy());
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ ToXPC(Accessible* aAccessible)
|
||||
return xpcDoc ? xpcDoc->GetAccessible(aAccessible) : nullptr;
|
||||
}
|
||||
|
||||
xpcAccessibleGeneric* ToXPC(AccessibleOrProxy aAcc);
|
||||
|
||||
inline xpcAccessibleHyperText*
|
||||
ToXPCText(HyperTextAccessible* aAccessible)
|
||||
{
|
||||
@ -135,6 +137,12 @@ ToXPCDocument(DocAccessible* aAccessible)
|
||||
return GetAccService()->GetXPCDocument(aAccessible);
|
||||
}
|
||||
|
||||
inline xpcAccessibleDocument*
|
||||
ToXPCDocument(DocAccessibleParent* aAccessible)
|
||||
{
|
||||
return GetAccService()->GetXPCDocument(aAccessible);
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user