Bug 479931. The index of the child content in its container needs to be adjusted to determine its index in the tree rows. r=neil

--HG--
extra : rebase_source : 30711fef343b77ffccdfcf45422eac83bcf6eece
This commit is contained in:
Timothy Nikkel 2009-10-18 16:23:11 -05:00
Родитель b3aedc7467
Коммит c1b5abd259
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1049,9 +1049,11 @@ nsTreeContentView::ContentInserted(nsIDocument *aDocument,
}
else if (childTag == nsGkAtoms::option) {
PRInt32 parentIndex = FindContent(aContainer);
PRInt32 count = InsertRow(parentIndex, aIndexInContainer, aChild);
PRInt32 index = 0;
GetIndexInSubtree(aContainer, aChild, &index);
PRInt32 count = InsertRow(parentIndex, index, aChild);
if (mBoxObject)
mBoxObject->RowCountChanged(parentIndex + aIndexInContainer + 1, count);
mBoxObject->RowCountChanged(parentIndex + index + 1, count);
}
}