Missing part of checkin to bug 245931. r=pkw, sr=bryner

This commit is contained in:
aaronleventhal%moonset.net 2004-06-16 13:09:10 +00:00
Родитель b4ffc1f48b
Коммит c665bef5ad
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -38,6 +38,7 @@
#include "nsIBoxObject.h" #include "nsIBoxObject.h"
#include "nsIDOMXULElement.h" #include "nsIDOMXULElement.h"
#include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsITreeSelection.h" #include "nsITreeSelection.h"
#include "nsITreeColumns.h" #include "nsITreeColumns.h"
#include "nsXULTreeAccessible.h" #include "nsXULTreeAccessible.h"
@ -475,13 +476,20 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetState(PRUint32 *_retval)
nsCOMPtr<nsITreeSelection> selection; nsCOMPtr<nsITreeSelection> selection;
mTreeView->GetSelection(getter_AddRefs(selection)); mTreeView->GetSelection(getter_AddRefs(selection));
if (selection) { if (selection) {
PRBool isSelected, currentIndex; PRBool isSelected;
selection->IsSelected(mRow, &isSelected); selection->IsSelected(mRow, &isSelected);
if (isSelected) if (isSelected)
*_retval |= STATE_SELECTED; *_retval |= STATE_SELECTED;
selection->GetCurrentIndex(&currentIndex); }
if (currentIndex == mRow)
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSelect =
do_QueryInterface(mDOMNode);
if (multiSelect) {
PRInt32 currentIndex;
multiSelect->GetCurrentIndex(&currentIndex);
if (currentIndex == mRow) {
*_retval |= STATE_FOCUSED; *_retval |= STATE_FOCUSED;
}
} }
PRInt32 firstVisibleRow, lastVisibleRow; PRInt32 firstVisibleRow, lastVisibleRow;