Bug 740696 - Don't cache AXParent value. This basically revert bug 455443. r=tbsaunde

This commit is contained in:
Hub Figuière 2012-04-05 14:36:27 -07:00
parent a8631c1247
commit a03647374b
2 changed files with 2 additions and 15 deletions

View File

@ -148,9 +148,6 @@ GetObjectOrRepresentedView(id <mozAccessible> aObject)
*/
- (void)appendChild:(nsAccessible*)aAccessible;
// invalidates the cached parent, used by invalidateChildren.
- (void)invalidateParent;
// makes ourselves "expired". after this point, we might be around if someone
// has retained us (e.g., a third-party), but we really contain no information.
- (void)expire;

View File

@ -354,14 +354,11 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
if (mParent)
return mParent;
nsAccessible* accessibleParent = mGeckoAccessible->GetUnignoredParent();
if (accessibleParent) {
id nativeParent = GetNativeFromGeckoAccessible(accessibleParent);
if (nativeParent)
return mParent = GetClosestInterestingAccessible(nativeParent);
return GetClosestInterestingAccessible(nativeParent);
}
// GetUnignoredParent() returns null when there is no unignored accessible all the way up to
@ -373,7 +370,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
id nativeParent = GetNativeFromGeckoAccessible(static_cast<nsIAccessible*>(root));
NSAssert1 (nativeParent, @"!!! we can't find a parent for %@", self);
return mParent = GetClosestInterestingAccessible(nativeParent);
return GetClosestInterestingAccessible(nativeParent);
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}
@ -615,8 +612,6 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
[mChildren makeObjectsPerformSelector:@selector(invalidateParent)];
// make room for new children
[mChildren release];
mChildren = nil;
@ -635,11 +630,6 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
[mChildren addObject:GetObjectOrRepresentedView(curNative)];
}
- (void)invalidateParent
{
mParent = nil;
}
- (void)expire
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;