Make sure the child shell list is still on the SHEntry when we call DocumentViewer::OpenWithEntry, since it uses that list to reattach the document container (bug 347426) r+sr=bzbarsky a=schrep
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@206677 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5449,15 +5449,6 @@ nsDocShell::RestoreFromHistory()
|
||||
nsCOMPtr<nsIDOMDocument> domDoc;
|
||||
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
|
||||
|
||||
nsCOMArray<nsIDocShellTreeItem> childShells;
|
||||
PRInt32 i = 0;
|
||||
nsCOMPtr<nsIDocShellTreeItem> child;
|
||||
while (NS_SUCCEEDED(mLSHE->ChildShellAt(i++, getter_AddRefs(child))) &&
|
||||
child) {
|
||||
childShells.AppendObject(child);
|
||||
}
|
||||
mLSHE->ClearChildShells();
|
||||
|
||||
// get the previous content viewer size
|
||||
nsRect oldBounds(0, 0, 0, 0);
|
||||
mLSHE->GetViewerBounds(oldBounds);
|
||||
@@ -5471,6 +5462,17 @@ nsDocShell::RestoreFromHistory()
|
||||
do_QueryInterface(mContentViewer);
|
||||
rv = cv18->OpenWithEntry(windowState, mLSHE);
|
||||
|
||||
// Now that we're done calling OpenWithEntry, we can grab the child
|
||||
// shell list off of mLSHE as well.
|
||||
nsCOMArray<nsIDocShellTreeItem> childShells;
|
||||
PRInt32 i = 0;
|
||||
nsCOMPtr<nsIDocShellTreeItem> child;
|
||||
while (NS_SUCCEEDED(mLSHE->ChildShellAt(i++, getter_AddRefs(child))) &&
|
||||
child) {
|
||||
childShells.AppendObject(child);
|
||||
}
|
||||
mLSHE->ClearChildShells();
|
||||
|
||||
// Now remove it from the cached presentation.
|
||||
mLSHE->SetContentViewer(nsnull);
|
||||
mEODForCurrentDocument = PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user