mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1241453 - switch MaiHyperLink to use AccessibleOrProxy r=davidb
This commit is contained in:
parent
6b82afaf17
commit
f7f97fab77
@ -135,7 +135,7 @@ MaiAtkObject::GetAtkHyperlink()
|
||||
MaiHyperlink* maiHyperlink =
|
||||
(MaiHyperlink*)g_object_get_qdata(G_OBJECT(this), quark_mai_hyperlink);
|
||||
if (!maiHyperlink) {
|
||||
maiHyperlink = new MaiHyperlink(accWrap.Bits());
|
||||
maiHyperlink = new MaiHyperlink(accWrap);
|
||||
g_object_set_qdata(G_OBJECT(this), quark_mai_hyperlink, maiHyperlink);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ mai_atk_hyperlink_get_type(void)
|
||||
return type;
|
||||
}
|
||||
|
||||
MaiHyperlink::MaiHyperlink(uintptr_t aHyperLink) :
|
||||
MaiHyperlink::MaiHyperlink(AccessibleOrProxy aHyperLink) :
|
||||
mHyperlink(aHyperLink),
|
||||
mMaiAtkHyperlink(nullptr)
|
||||
{
|
||||
|
@ -23,31 +23,29 @@ namespace a11y {
|
||||
class MaiHyperlink
|
||||
{
|
||||
public:
|
||||
explicit MaiHyperlink(uintptr_t aHyperLink);
|
||||
explicit MaiHyperlink(AccessibleOrProxy aHyperLink);
|
||||
~MaiHyperlink();
|
||||
|
||||
public:
|
||||
AtkHyperlink* GetAtkHyperlink() const { return mMaiAtkHyperlink; }
|
||||
Accessible* GetAccHyperlink()
|
||||
{
|
||||
if (!mHyperlink || mHyperlink & IS_PROXY)
|
||||
if (!mHyperlink.IsAccessible())
|
||||
return nullptr;
|
||||
|
||||
Accessible* link = reinterpret_cast<Accessible*>(mHyperlink);
|
||||
Accessible* link = mHyperlink.AsAccessible();
|
||||
if (!link) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_ASSERTION(link->IsLink(), "Why isn't it a link!");
|
||||
return link;
|
||||
}
|
||||
|
||||
ProxyAccessible* Proxy() const
|
||||
{
|
||||
if (!(mHyperlink & IS_PROXY))
|
||||
return nullptr;
|
||||
|
||||
return reinterpret_cast<ProxyAccessible*>(mHyperlink & ~IS_PROXY);
|
||||
}
|
||||
ProxyAccessible* Proxy() const { return mHyperlink.AsProxy(); }
|
||||
|
||||
protected:
|
||||
uintptr_t mHyperlink;
|
||||
AccessibleOrProxy mHyperlink;
|
||||
AtkHyperlink* mMaiAtkHyperlink;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user