Scrollbar tweaks.

git-svn-id: svn://10.0.0.236/trunk@57993 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 2000-01-17 05:58:19 +00:00
parent 4e41ec610f
commit 3cf48ce980

View File

@ -1021,6 +1021,10 @@ nsTreeRowGroupFrame::ReflowAfterRowLayout(nsIPresContext* aPresContext,
PRInt32 count = 0;
ComputeTotalRowCount(count, mContent); // XXX This sucks! Needs to be cheap!
nsTableFrame* tableFrame;
nsTableFrame::GetTableFrame(this, tableFrame);
nsTreeFrame* treeFrame = (nsTreeFrame*)tableFrame;
// Our page size is the # of rows instantiated.
PRInt32 pageRowCount;
GetRowCount(pageRowCount);
@ -1063,10 +1067,7 @@ nsTreeRowGroupFrame::ReflowAfterRowLayout(nsIPresContext* aPresContext,
mScrollbar = nsnull;
// Dirty the tree for another reflow.
nsTableFrame* tableFrame;
nsTableFrame::GetTableFrame(this, tableFrame);
MarkTreeAsDirty(aPresContext, (nsTreeFrame*)tableFrame);
MarkTreeAsDirty(aPresContext, treeFrame);
}
}
@ -1089,6 +1090,12 @@ nsTreeRowGroupFrame::ReflowAfterRowLayout(nsIPresContext* aPresContext,
if (rowCount < 0)
rowCount = 0;
// Subtract one from our maxpos if we're a fixed row height.
PRInt32 rowSize = treeFrame->GetFixedRowSize();
if (rowSize != -1) {
rowCount--;
}
nsAutoString maxpos;
if (!mIsFull) {
// We are not full. This means that we are not allowed to scroll any further. We are
@ -1411,9 +1418,22 @@ PRBool nsTreeRowGroupFrame::ContinueReflow(nsIFrame* aFrame, nsIPresContext* aPr
}
PRBool reflowStopped = treeFrame->IsReflowHalted();
/*if (reflowStopped) {
// This is only hit for fixed row trees (e.g., rows="3")
nsCOMPtr<nsIContent> nextRow;
nsCOMPtr<nsIContent> treeContent;
treeFrame->GetContent(getter_AddRefs(treeContent));
FindRowContentAtIndex(rowSize, treeContent,
getter_AddRefs(nextRow));
if (nextRow)
mIsFull = PR_TRUE;
}*/
if ((rowSize == -1 && height <= 0) || reflowStopped) {
mIsFull = PR_TRUE;
nsIFrame* lastChild = GetLastFrame();
nsIFrame* startingPoint = mBottomFrame;
if (startingPoint == nsnull) {