mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 367154 ��� Thunderbird crashed [@ nsXULTreeAccessibleWrap::GetChildCount] when I mouse clicked on the trash folder in the folders tree table
patch by Evan.Yan at sun.com r=aaronleventhal
This commit is contained in:
parent
4ac08e1223
commit
500c27efc8
@ -64,14 +64,15 @@ NS_IMETHODIMP nsXULTreeAccessibleWrap::GetChildCount(PRInt32 *aAccChildCount)
|
||||
// by going through DOM structure of XUL tree
|
||||
nsAccessible::GetChildCount(aAccChildCount);
|
||||
|
||||
// add the count of table cell (or tree item) accessibles, which are
|
||||
// created and appended by XUL tree accessible implementation
|
||||
PRInt32 rowCount, colCount = 1;
|
||||
mTreeView->GetRowCount(&rowCount);
|
||||
mFirstChild->GetChildCount(&colCount);
|
||||
|
||||
*aAccChildCount += rowCount * colCount;
|
||||
if (*aAccChildCount != eChildCountUninitialized) {
|
||||
// add the count of table cell (or tree item) accessibles, which are
|
||||
// created and appended by XUL tree accessible implementation
|
||||
PRInt32 rowCount, colCount = 1;
|
||||
mTreeView->GetRowCount(&rowCount);
|
||||
mFirstChild->GetChildCount(&colCount);
|
||||
|
||||
*aAccChildCount += rowCount * colCount;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -286,10 +286,11 @@ NS_IMETHODIMP nsXULTreeAccessible::GetChildCount(PRInt32 *aAccChildCount)
|
||||
|
||||
nsAccessible::GetChildCount(aAccChildCount);
|
||||
|
||||
PRInt32 rowCount;
|
||||
mTreeView->GetRowCount(&rowCount);
|
||||
*aAccChildCount += rowCount;
|
||||
|
||||
if (*aAccChildCount != eChildCountUninitialized) {
|
||||
PRInt32 rowCount;
|
||||
mTreeView->GetRowCount(&rowCount);
|
||||
*aAccChildCount += rowCount;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user