mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
Bug 547342 real fix. Flush on ScrollToRow. r=enn
This commit is contained in:
parent
71030cb8d2
commit
67950dbf82
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user