From 75153d6e16510740d62352e828ac60e68f98da18 Mon Sep 17 00:00:00 2001 From: "aaronleventhal%moonset.net" Date: Tue, 15 Mar 2005 15:32:30 +0000 Subject: [PATCH] Bug 280055. AccessibleObjectFromPoint() broken for XUL tabs in Firefox. r+sr=roc --- accessible/src/base/nsAccessible.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index dba03400241b..fa30d0f49089 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -589,8 +589,15 @@ PRBool nsAccessible::IsPartiallyVisible(PRBool *aIsOffscreen) NS_STATIC_CAST(PRUint16, (kMinPixels * p2t)), &rectVisibility); - if (rectVisibility == nsRectVisibility_kVisible) + if (rectVisibility == nsRectVisibility_kVisible) { + // This view says it is visible, but we need to check the parent view chain :( + while ((containingView = containingView->GetParent()) != nsnull) { + if (containingView->GetVisibility() == nsViewVisibility_kHide) { + return PR_FALSE; + } + } return PR_TRUE; + } *aIsOffscreen = rectVisibility != nsRectVisibility_kZeroAreaRect; return PR_FALSE;