Bug 547342 real fix. Flush on ScrollToRow. r=enn

This commit is contained in:
Boris Zbarsky 2010-08-05 14:39:39 -04:00
Родитель 71030cb8d2
Коммит 67950dbf82
4 изменённых файлов: 5 добавлений и 5 удалений

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

@ -107,7 +107,6 @@ var oldtreefirstrow, oldtreecfirstrow;
function nextDataSource()
{
document.documentElement.getBoundingClientRect();
var tree = document.getElementById('t');
var treec = document.getElementById('tc');
tree.treeBoxObject.scrollToRow(10);

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

@ -143,6 +143,7 @@ nsTreeBodyFrame::nsTreeBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aCont
:nsLeafBoxFrame(aPresShell, aContext),
mSlots(nsnull),
mTopRowIndex(0),
mPageLength(0),
mHorzPosition(0),
mHorzWidth(0),
mAdjustWidth(0),

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

@ -114,13 +114,13 @@ static void FindBodyElement(nsIContent* aParent, nsIContent** aResult)
}
nsTreeBodyFrame*
nsTreeBoxObject::GetTreeBody()
nsTreeBoxObject::GetTreeBody(bool aFlushLayout)
{
if (mTreeBody) {
return mTreeBody;
}
nsIFrame* frame = GetFrame(PR_FALSE);
nsIFrame* frame = GetFrame(aFlushLayout);
if (!frame)
return nsnull;
@ -324,7 +324,7 @@ nsTreeBoxObject::EnsureCellIsVisible(PRInt32 aRow, nsITreeColumn* aCol)
NS_IMETHODIMP
nsTreeBoxObject::ScrollToRow(PRInt32 aRow)
{
nsTreeBodyFrame* body = GetTreeBody();
nsTreeBodyFrame* body = GetTreeBody(true);
if (body)
return body->ScrollToRow(aRow);
return NS_OK;

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

@ -57,7 +57,7 @@ public:
nsTreeBoxObject();
~nsTreeBoxObject();
nsTreeBodyFrame* GetTreeBody();
nsTreeBodyFrame* GetTreeBody(bool aFlushLayout = false);
nsTreeBodyFrame* GetCachedTreeBody() { return mTreeBody; }
//NS_PIBOXOBJECT interfaces