зеркало из https://github.com/mozilla/gecko-dev.git
Bug 626667, part1 - getParent shouldn't repair the tree, r=davidb, a=davidb
This commit is contained in:
Родитель
f6622b4905
Коммит
9b7d100266
|
@ -2828,37 +2828,6 @@ nsAccessible::RemoveChild(nsAccessible* aChild)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
nsAccessible*
|
||||
nsAccessible::GetParent()
|
||||
{
|
||||
if (mParent)
|
||||
return mParent;
|
||||
|
||||
if (IsDefunct())
|
||||
return nsnull;
|
||||
|
||||
// XXX: mParent can be null randomly because supposedly we get layout
|
||||
// notification and invalidate parent-child relations, this accessible stays
|
||||
// unattached. This should gone after bug 572951.
|
||||
NS_WARNING("Bad accessible tree!");
|
||||
|
||||
#ifdef DEBUG
|
||||
nsDocAccessible *docAccessible = GetDocAccessible();
|
||||
NS_ASSERTION(docAccessible, "No document accessible for valid accessible!");
|
||||
#endif
|
||||
|
||||
nsAccessible* parent = GetAccService()->GetContainerAccessible(mContent,
|
||||
mWeakShell);
|
||||
NS_ASSERTION(parent, "No accessible parent for valid accessible!");
|
||||
if (!parent)
|
||||
return nsnull;
|
||||
|
||||
// Repair parent-child relations.
|
||||
parent->EnsureChildren();
|
||||
NS_ASSERTION(parent == mParent, "Wrong children repair!");
|
||||
return parent;
|
||||
}
|
||||
|
||||
nsAccessible*
|
||||
nsAccessible::GetChildAt(PRUint32 aIndex)
|
||||
{
|
||||
|
|
|
@ -261,7 +261,7 @@ public:
|
|||
/**
|
||||
* Return parent accessible.
|
||||
*/
|
||||
virtual nsAccessible* GetParent();
|
||||
nsAccessible* GetParent() const { return mParent; }
|
||||
|
||||
/**
|
||||
* Return child accessible at the given index.
|
||||
|
|
|
@ -410,12 +410,6 @@ nsApplicationAccessible::InvalidateChildren()
|
|||
// and RemoveChild() method calls.
|
||||
}
|
||||
|
||||
nsAccessible*
|
||||
nsApplicationAccessible::GetParent()
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessible protected methods
|
||||
|
||||
|
|
|
@ -131,8 +131,6 @@ public:
|
|||
|
||||
virtual void InvalidateChildren();
|
||||
|
||||
virtual nsAccessible* GetParent();
|
||||
|
||||
protected:
|
||||
|
||||
// nsAccessible
|
||||
|
|
|
@ -127,11 +127,6 @@
|
|||
try {
|
||||
docAcc = docAcc.parent;
|
||||
} catch (e) {
|
||||
// XXX: it may randomaly fail on propertypage accessible of browser's
|
||||
// tabbbrowser if nsIAccessible::parent returns cached parent only.
|
||||
// This should gone after bug 572951.
|
||||
// Error: failed | Can't get parent for [ 'panel1277435313424' ,
|
||||
// role: propertypage]
|
||||
ok(false, "Can't get parent for " + prettyName(docAcc));
|
||||
throw e;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче