зеркало из https://github.com/mozilla/pjs.git
Bug 630180 - ###!!! ASSERTION: No parent accessible where we're not direct child of window: 'xpParentAcc', file .../msaa/nsAccessibleWrap.cpp, r=davidb, a=davidb
This commit is contained in:
Родитель
954f979755
Коммит
dd348a8ee2
|
@ -359,6 +359,8 @@ public:
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Downcasting
|
||||
|
||||
inline bool IsApplication() const { return mFlags & eApplicationAccessible; }
|
||||
|
||||
inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; }
|
||||
nsHyperTextAccessible* AsHyperText();
|
||||
|
||||
|
@ -505,8 +507,9 @@ protected:
|
|||
* @note keep these flags in sync with ChildrenFlags
|
||||
*/
|
||||
enum AccessibleTypes {
|
||||
eHyperTextAccessible = 1 << 2,
|
||||
eTextLeafAccessible = 1 << 3
|
||||
eApplicationAccessible = 1 << 2,
|
||||
eHyperTextAccessible = 1 << 3,
|
||||
eTextLeafAccessible = 1 << 4
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
nsApplicationAccessible::nsApplicationAccessible() :
|
||||
nsAccessibleWrap(nsnull, nsnull)
|
||||
{
|
||||
mFlags |= eApplicationAccessible;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -215,11 +215,13 @@ __try {
|
|||
}
|
||||
|
||||
nsAccessible* xpParentAcc = GetParent();
|
||||
NS_ASSERTION(xpParentAcc,
|
||||
"No parent accessible where we're not direct child of window");
|
||||
if (!xpParentAcc) {
|
||||
if (IsApplication())
|
||||
return S_OK;
|
||||
|
||||
if (!xpParentAcc)
|
||||
NS_ERROR("No parent accessible. Should we really assert here?");
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
*ppdispParent = NativeAccessible(xpParentAcc);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче