mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1155829 - inline MaiHyperlink::GetAtkHyperlink r=surkov
This commit is contained in:
parent
b2a307c179
commit
f91e5d47b4
@ -94,36 +94,25 @@ MaiHyperlink::MaiHyperlink(Accessible* aHyperLink) :
|
|||||||
mHyperlink(aHyperLink),
|
mHyperlink(aHyperLink),
|
||||||
mMaiAtkHyperlink(nullptr)
|
mMaiAtkHyperlink(nullptr)
|
||||||
{
|
{
|
||||||
}
|
|
||||||
|
|
||||||
MaiHyperlink::~MaiHyperlink()
|
|
||||||
{
|
|
||||||
if (mMaiAtkHyperlink) {
|
|
||||||
MAI_ATK_HYPERLINK(mMaiAtkHyperlink)->maiHyperlink = nullptr;
|
|
||||||
g_object_unref(mMaiAtkHyperlink);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AtkHyperlink*
|
|
||||||
MaiHyperlink::GetAtkHyperlink(void)
|
|
||||||
{
|
|
||||||
NS_ENSURE_TRUE(mHyperlink, nullptr);
|
|
||||||
|
|
||||||
if (mMaiAtkHyperlink)
|
|
||||||
return mMaiAtkHyperlink;
|
|
||||||
|
|
||||||
if (!mHyperlink->IsLink())
|
if (!mHyperlink->IsLink())
|
||||||
return nullptr;
|
return;
|
||||||
|
|
||||||
mMaiAtkHyperlink =
|
mMaiAtkHyperlink =
|
||||||
reinterpret_cast<AtkHyperlink *>
|
reinterpret_cast<AtkHyperlink *>
|
||||||
(g_object_new(mai_atk_hyperlink_get_type(), nullptr));
|
(g_object_new(mai_atk_hyperlink_get_type(), nullptr));
|
||||||
NS_ASSERTION(mMaiAtkHyperlink, "OUT OF MEMORY");
|
NS_ASSERTION(mMaiAtkHyperlink, "OUT OF MEMORY");
|
||||||
NS_ENSURE_TRUE(mMaiAtkHyperlink, nullptr);
|
if (!mMaiAtkHyperlink)
|
||||||
|
return;
|
||||||
|
|
||||||
MAI_ATK_HYPERLINK(mMaiAtkHyperlink)->maiHyperlink = this;
|
MAI_ATK_HYPERLINK(mMaiAtkHyperlink)->maiHyperlink = this;
|
||||||
|
}
|
||||||
|
|
||||||
return mMaiAtkHyperlink;
|
MaiHyperlink::~MaiHyperlink()
|
||||||
|
{
|
||||||
|
if (mMaiAtkHyperlink) {
|
||||||
|
MAI_ATK_HYPERLINK(mMaiAtkHyperlink)->maiHyperlink = nullptr;
|
||||||
|
g_object_unref(mMaiAtkHyperlink);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ public:
|
|||||||
~MaiHyperlink();
|
~MaiHyperlink();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AtkHyperlink *GetAtkHyperlink(void);
|
AtkHyperlink* GetAtkHyperlink() const { return mMaiAtkHyperlink; }
|
||||||
Accessible* GetAccHyperlink()
|
Accessible* GetAccHyperlink()
|
||||||
{ return mHyperlink && mHyperlink->IsLink() ? mHyperlink : nullptr; }
|
{ return mHyperlink && mHyperlink->IsLink() ? mHyperlink : nullptr; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user