Bug 387710 - getAccessibleAt() is broken for tree tables effective 5th July trunk build of Thunderbird.
r=aaronleventhal a=dsicore git-svn-id: svn://10.0.0.236/trunk@231954 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0663bb8f71
commit
97dff36e75
@ -96,6 +96,23 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetColumns(PRInt32 *aColumns)
|
||||
NS_ENSURE_TRUE(acc, NS_ERROR_FAILURE);
|
||||
|
||||
rv = acc->GetChildCount(aColumns);
|
||||
|
||||
// The last child could be column picker. In that case, we need to minus the
|
||||
// number of columns by 1
|
||||
nsCOMPtr<nsIAccessible> lastChildAccessible;
|
||||
acc->GetLastChild(getter_AddRefs(lastChildAccessible));
|
||||
nsCOMPtr<nsIAccessNode> accessNode = do_QueryInterface(lastChildAccessible);
|
||||
NS_ENSURE_TRUE(accessNode, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDOMNode> domNode;
|
||||
accessNode->GetDOMNode(getter_AddRefs(domNode));
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(domNode);
|
||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
||||
// it's menupopup inside column picker
|
||||
if (content->NodeInfo()->Equals(nsAccessibilityAtoms::menupopup,
|
||||
kNameSpaceID_XUL)) {
|
||||
(*aColumns)--;
|
||||
}
|
||||
|
||||
return *aColumns > 0 ? rv : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user