зеркало из https://github.com/mozilla/pjs.git
Bug 346957 Reconnect the view to the tree after a reframe r+sr=roc
This commit is contained in:
Родитель
1bd8804d41
Коммит
790344c5d8
|
@ -161,7 +161,18 @@ nsTreeBoxObject::GetTreeBody()
|
|||
|
||||
NS_IMETHODIMP nsTreeBoxObject::GetView(nsITreeView * *aView)
|
||||
{
|
||||
if (!mView && GetTreeBody()) {
|
||||
if (!mTreeBody) {
|
||||
if (!GetTreeBody()) {
|
||||
// Don't return an uninitialised view
|
||||
*aView = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mView)
|
||||
// Our new frame needs to initialise itself
|
||||
return mTreeBody->GetView(aView);
|
||||
}
|
||||
if (!mView) {
|
||||
nsCOMPtr<nsIDOMXULElement> xulele = do_QueryInterface(mContent);
|
||||
if (xulele) {
|
||||
// See if there is a XUL tree builder associated with the element
|
||||
|
@ -175,6 +186,7 @@ NS_IMETHODIMP nsTreeBoxObject::GetView(nsITreeView * *aView)
|
|||
NS_ENSURE_TRUE(rv, rv);
|
||||
}
|
||||
|
||||
// Initialise the frame and view
|
||||
mTreeBody->SetView(mView);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче