mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1241453 - fixup xpcAccessible Intl() methods to not assume mIntl is always an Accessible r=davidb
This commit is contained in:
parent
64b8e7af37
commit
24fd26a373
@ -61,7 +61,14 @@ protected:
|
||||
virtual ~xpcAccessibleDocument() {}
|
||||
|
||||
private:
|
||||
DocAccessible* Intl() { return mIntl.AsAccessible()->AsDoc(); }
|
||||
DocAccessible* Intl()
|
||||
{
|
||||
if (Accessible* acc = mIntl.AsAccessible()) {
|
||||
return acc->AsDoc();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void NotifyOfShutdown(Accessible* aAccessible)
|
||||
{
|
||||
|
@ -43,7 +43,14 @@ protected:
|
||||
virtual ~xpcAccessibleHyperText() {}
|
||||
|
||||
private:
|
||||
HyperTextAccessible* Intl() { return mIntl.AsAccessible()->AsHyperText(); }
|
||||
HyperTextAccessible* Intl()
|
||||
{
|
||||
if (Accessible* acc = mIntl.AsAccessible()) {
|
||||
return acc->AsHyperText();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
xpcAccessibleHyperText(const xpcAccessibleHyperText&) = delete;
|
||||
xpcAccessibleHyperText& operator =(const xpcAccessibleHyperText&) = delete;
|
||||
|
@ -34,7 +34,8 @@ protected:
|
||||
virtual ~xpcAccessibleImage() {}
|
||||
|
||||
private:
|
||||
ImageAccessible* Intl() { return mIntl.AsAccessible()->AsImage(); }
|
||||
ImageAccessible* Intl()
|
||||
{ return mIntl.IsAccessible() ? mIntl.AsAccessible()->AsImage() : nullptr; }
|
||||
|
||||
xpcAccessibleImage(const xpcAccessibleImage&) = delete;
|
||||
xpcAccessibleImage& operator =(const xpcAccessibleImage&) = delete;
|
||||
|
@ -83,7 +83,8 @@ protected:
|
||||
virtual ~xpcAccessibleTable() {}
|
||||
|
||||
private:
|
||||
TableAccessible* Intl() { return mIntl.AsAccessible()->AsTable(); }
|
||||
TableAccessible* Intl()
|
||||
{ return mIntl.IsAccessible() ? mIntl.AsAccessible()->AsTable() : nullptr; }
|
||||
|
||||
xpcAccessibleTable(const xpcAccessibleTable&) = delete;
|
||||
xpcAccessibleTable& operator =(const xpcAccessibleTable&) = delete;
|
||||
|
@ -43,7 +43,14 @@ protected:
|
||||
virtual ~xpcAccessibleTableCell() {}
|
||||
|
||||
private:
|
||||
TableCellAccessible* Intl() { return mIntl.AsAccessible()->AsTableCell(); }
|
||||
TableCellAccessible* Intl()
|
||||
{
|
||||
if (Accessible* acc = mIntl.AsAccessible()) {
|
||||
return acc->AsTableCell();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
xpcAccessibleTableCell(const xpcAccessibleTableCell&) = delete;
|
||||
xpcAccessibleTableCell& operator =(const xpcAccessibleTableCell&) = delete;
|
||||
|
Loading…
Reference in New Issue
Block a user