зеркало из https://github.com/mozilla/gecko-dev.git
Bug 547342 real fix. Flush on ScrollToRow. r=enn
This commit is contained in:
Родитель
71030cb8d2
Коммит
67950dbf82
|
@ -107,7 +107,6 @@ var oldtreefirstrow, oldtreecfirstrow;
|
||||||
|
|
||||||
function nextDataSource()
|
function nextDataSource()
|
||||||
{
|
{
|
||||||
document.documentElement.getBoundingClientRect();
|
|
||||||
var tree = document.getElementById('t');
|
var tree = document.getElementById('t');
|
||||||
var treec = document.getElementById('tc');
|
var treec = document.getElementById('tc');
|
||||||
tree.treeBoxObject.scrollToRow(10);
|
tree.treeBoxObject.scrollToRow(10);
|
||||||
|
|
|
@ -143,6 +143,7 @@ nsTreeBodyFrame::nsTreeBodyFrame(nsIPresShell* aPresShell, nsStyleContext* aCont
|
||||||
:nsLeafBoxFrame(aPresShell, aContext),
|
:nsLeafBoxFrame(aPresShell, aContext),
|
||||||
mSlots(nsnull),
|
mSlots(nsnull),
|
||||||
mTopRowIndex(0),
|
mTopRowIndex(0),
|
||||||
|
mPageLength(0),
|
||||||
mHorzPosition(0),
|
mHorzPosition(0),
|
||||||
mHorzWidth(0),
|
mHorzWidth(0),
|
||||||
mAdjustWidth(0),
|
mAdjustWidth(0),
|
||||||
|
|
|
@ -114,13 +114,13 @@ static void FindBodyElement(nsIContent* aParent, nsIContent** aResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
nsTreeBodyFrame*
|
nsTreeBodyFrame*
|
||||||
nsTreeBoxObject::GetTreeBody()
|
nsTreeBoxObject::GetTreeBody(bool aFlushLayout)
|
||||||
{
|
{
|
||||||
if (mTreeBody) {
|
if (mTreeBody) {
|
||||||
return mTreeBody;
|
return mTreeBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame* frame = GetFrame(PR_FALSE);
|
nsIFrame* frame = GetFrame(aFlushLayout);
|
||||||
if (!frame)
|
if (!frame)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ nsTreeBoxObject::EnsureCellIsVisible(PRInt32 aRow, nsITreeColumn* aCol)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsTreeBoxObject::ScrollToRow(PRInt32 aRow)
|
nsTreeBoxObject::ScrollToRow(PRInt32 aRow)
|
||||||
{
|
{
|
||||||
nsTreeBodyFrame* body = GetTreeBody();
|
nsTreeBodyFrame* body = GetTreeBody(true);
|
||||||
if (body)
|
if (body)
|
||||||
return body->ScrollToRow(aRow);
|
return body->ScrollToRow(aRow);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
nsTreeBoxObject();
|
nsTreeBoxObject();
|
||||||
~nsTreeBoxObject();
|
~nsTreeBoxObject();
|
||||||
|
|
||||||
nsTreeBodyFrame* GetTreeBody();
|
nsTreeBodyFrame* GetTreeBody(bool aFlushLayout = false);
|
||||||
nsTreeBodyFrame* GetCachedTreeBody() { return mTreeBody; }
|
nsTreeBodyFrame* GetCachedTreeBody() { return mTreeBody; }
|
||||||
|
|
||||||
//NS_PIBOXOBJECT interfaces
|
//NS_PIBOXOBJECT interfaces
|
||||||
|
|
Загрузка…
Ссылка в новой задаче