зеркало из https://github.com/mozilla/gecko-dev.git
bug 1241453 - fixup xpcAccessible Intl() methods to not assume mIntl is always an Accessible r=davidb
This commit is contained in:
Родитель
dd9c8002ab
Коммит
9672799f00
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче