From c66b1816586dd997b7ccb8d05199bd11b5700051 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Thu, 13 Jul 2000 00:12:38 +0000 Subject: [PATCH] Additional fix for not scrolling to bottom of tree (dogfood bug), r=bryner git-svn-id: svn://10.0.0.236/trunk@74133 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xul/base/src/nsXULTreeOuterGroupFrame.cpp | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/mozilla/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp b/mozilla/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp index 0616b7eacc1..139ddf8393d 100644 --- a/mozilla/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp +++ b/mozilla/layout/xul/base/src/nsXULTreeOuterGroupFrame.cpp @@ -458,23 +458,21 @@ nsXULTreeOuterGroupFrame::PositionChanged(PRInt32 aOldIndex, PRInt32 aNewIndex) NS_IMETHODIMP nsXULTreeOuterGroupFrame::InternalPositionChanged(PRBool aUp, PRInt32 aDelta) { + if (mContentChain) { + // XXX Eventually we need to make the code smart enough to look at a content chain + // when building ANOTHER content chain. + // Ensure all reflows happen first and make sure we're dirty. + nsCOMPtr shell; + mPresContext->GetShell(getter_AddRefs(shell)); + shell->FlushPendingNotifications(); + } + PRInt32 visibleRows = 0; if (mRowHeight) - visibleRows = GetAvailableHeight()/mRowHeight; + visibleRows = GetAvailableHeight()/mRowHeight; // Get our presentation context. if (aDelta < visibleRows) { - if (mContentChain) { - // XXX This could cause problems because of async reflow. - // Eventually we need to make the code smart enough to look at a content chain - // when building ANOTHER content chain. - - // Ensure all reflows happen first. - nsCOMPtr shell; - mPresContext->GetShell(getter_AddRefs(shell)); - shell->FlushPendingNotifications(); - } - PRInt32 loseRows = aDelta; // scrolling down