Move resuming of timeouts to after we've restored the docshell hierarchy, so that they're restored correctly for subframes. Bug 305156, r=cbiesinger, sr=jst.

This commit is contained in:
bryner%brianryner.com 2005-08-25 07:06:59 +00:00
Родитель b204b4bce1
Коммит cb47a2d735
4 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -5389,6 +5389,10 @@ nsDocShell::RestoreFromHistory()
}
}
// Now that all of the child docshells have been put into place, we can
// restart the timers for the window and all of the child frames.
privWin->ResumeTimeouts();
// Restore the refresh URI list. The refresh timers will be restarted
// when EndPageLoad() is called.
mLSHE->GetRefreshURIList(getter_AddRefs(mRefreshURIList));

Просмотреть файл

@ -77,8 +77,8 @@ class nsIDocument;
struct nsTimeout;
#define NS_PIDOMWINDOW_IID \
{ 0x1f9346e6, 0x3814, 0x4c3b, \
{ 0x9d, 0x04, 0x0b, 0x93, 0x86, 0x53, 0x2b, 0xbf } }
{ 0x55f987bc, 0xca30, 0x494c, \
{ 0xa9, 0x85, 0xf1, 0xf3, 0x4b, 0x9d, 0x47, 0xd8 } }
class nsPIDOMWindow : public nsIDOMWindowInternal
{
@ -267,6 +267,9 @@ public:
// Restore the window state from aState.
virtual nsresult RestoreWindowState(nsISupports *aState) = 0;
// Resume suspended timeouts in this window and in child windows.
virtual nsresult ResumeTimeouts() = 0;
nsPIDOMWindow *GetOuterWindow()
{
return mIsInnerWindow ? mOuterWindow : this;

Просмотреть файл

@ -6741,7 +6741,7 @@ nsGlobalWindow::RestoreWindowState(nsISupports *aState)
holder->DidRestoreWindow();
return inner->ResumeTimeouts();
return NS_OK;
}
void

Просмотреть файл

@ -394,7 +394,7 @@ protected:
already_AddRefed<nsIWidget> GetMainWidget();
void SuspendTimeouts();
nsresult ResumeTimeouts();
virtual nsresult ResumeTimeouts();
void Freeze()
{