mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1107337 - support downcasting Accessible to OuterDocAccessible r=lsocks, davidb
This commit is contained in:
parent
0c57a2bf4a
commit
49c7254fe8
@ -38,6 +38,7 @@ class HTMLLIAccessible;
|
||||
class HyperTextAccessible;
|
||||
class ImageAccessible;
|
||||
class KeyBinding;
|
||||
class OuterDocAccessible;
|
||||
class ProxyAccessible;
|
||||
class Relation;
|
||||
class RootAccessible;
|
||||
@ -619,6 +620,9 @@ public:
|
||||
return mBits.proxy;
|
||||
}
|
||||
|
||||
bool IsOuterDoc() const { return mType == eOuterDocType; }
|
||||
OuterDocAccessible* AsOuterDoc();
|
||||
|
||||
bool IsProgress() const { return mType == eProgressType; }
|
||||
|
||||
bool IsRoot() const { return mType == eRootType; }
|
||||
|
@ -26,6 +26,7 @@ OuterDocAccessible::
|
||||
OuterDocAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
AccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mType = eOuterDocType;
|
||||
}
|
||||
|
||||
OuterDocAccessible::~OuterDocAccessible()
|
||||
|
@ -44,6 +44,11 @@ protected:
|
||||
virtual void CacheChildren() override;
|
||||
};
|
||||
|
||||
inline OuterDocAccessible*
|
||||
Accessible::AsOuterDoc()
|
||||
{
|
||||
return IsOuterDoc() ? static_cast<OuterDocAccessible*>(this) : nullptr;
|
||||
}
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user