From b80187d3a7e0a4e2281949ba003cf7fb20b07524 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Fri, 27 Feb 2009 18:47:15 +0800 Subject: [PATCH] Bug 476404 - [SeaMonkey] New a11y test_relations.xul fails, r=marcoz, davidb, sr=neil --- accessible/src/base/nsRootAccessible.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/accessible/src/base/nsRootAccessible.cpp b/accessible/src/base/nsRootAccessible.cpp index 3cd1d0c40f8..cfca900bfd8 100644 --- a/accessible/src/base/nsRootAccessible.cpp +++ b/accessible/src/base/nsRootAccessible.cpp @@ -992,7 +992,14 @@ nsRootAccessible::GetContentDocShell(nsIDocShellTreeItem *aStart) if (itemType == nsIDocShellTreeItem::typeContent) { nsCOMPtr accDoc = GetDocAccessibleFor(aStart, PR_TRUE); + + // Hidden documents don't have accessibles (like SeaMonkey's sidebar), + // they are of no interest for a11y. + if (!accDoc) + return nsnull; + nsCOMPtr accessible = do_QueryInterface(accDoc); + // If ancestor chain of accessibles is not completely visible, // don't use this one. This happens for example if it's inside // a background tab (tabbed browsing)