Bug 597774. Make sure to invalidate when inserting the root view of a document when it is coming out of the bfcache. r=roc,bz a=roc

This commit is contained in:
Timothy Nikkel 2011-02-09 22:35:03 -06:00
parent 9336a81739
commit f93783378f

View File

@ -7307,13 +7307,30 @@ nsDocShell::RestoreFromHistory()
}
}
// The FinishRestore call below can kill these, null them out so we don't
// have invalid pointer lying around.
newRootView = rootViewSibling = rootViewParent = nsnull;
newVM = nsnull;
// Simulate the completion of the load.
nsDocShell::FinishRestore();
// Restart plugins, and paint the content.
if (shell)
if (shell) {
shell->Thaw();
newVM = shell->GetViewManager();
if (newVM) {
// When we insert the root view above the resulting invalidate is
// dropped because painting is suppressed in the presshell until we
// call Thaw. So we issue the invalidate here.
newVM->GetRootView(newRootView);
if (newRootView) {
newVM->UpdateView(newRootView, NS_VMREFRESH_NO_SYNC);
}
}
}
return privWin->FireDelayedDOMEvents();
}