mPrefs were shadowing the ones in docShell. This fixes the bug where prefs weren't being found in presContext because the contentViewer is now being created in docShell which had a different set of prefs. r=beard a=rickg.

This commit is contained in:
tbogard%aol.net 2000-03-01 03:22:14 +00:00
Родитель ff4a0b661d
Коммит 46b0064aaa
2 изменённых файлов: 6 добавлений и 28 удалений

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

@ -388,7 +388,6 @@ protected:
nsIWebShellContainer* mContainer;
nsIDeviceContext* mDeviceContext;
nsIPref* mPrefs;
nsIWidget* mWindow;
nsIDocumentLoader* mDocLoader;
@ -627,7 +626,6 @@ nsWebShell::~nsWebShell()
NS_IF_RELEASE(mThreadEventQueue);
mContentViewer=nsnull;
NS_IF_RELEASE(mDeviceContext);
NS_IF_RELEASE(mPrefs);
NS_IF_RELEASE(mContainer);
if (mScriptGlobal) {
@ -1051,9 +1049,7 @@ nsWebShell::HandleEvent(nsGUIEvent *aEvent)
NS_IMETHODIMP
nsWebShell::GetPrefs(nsIPref*& aPrefs)
{
aPrefs = mPrefs;
NS_IF_ADDREF(aPrefs);
return NS_OK;
return nsDocShell::GetPrefs(&aPrefs);
}
NS_IMETHODIMP
@ -3782,19 +3778,12 @@ NS_IMETHODIMP nsWebShell::SetLoadCookie(nsISupports * aLoadCookie)
NS_IMETHODIMP nsWebShell::GetPrefs(nsIPref** aPrefs)
{
NS_ENSURE_ARG_POINTER(aPrefs);
*aPrefs = mPrefs;
NS_IF_ADDREF(*aPrefs);
return NS_OK;
return nsDocShell::GetPrefs(aPrefs);
}
NS_IMETHODIMP nsWebShell::SetPrefs(nsIPref* aPrefs)
{
NS_IF_RELEASE(mPrefs);
mPrefs = aPrefs;
NS_IF_ADDREF(mPrefs);
return NS_OK;
return nsDocShell::SetPrefs(aPrefs);
}
NS_IMETHODIMP nsWebShell::GetZoom(float* aZoom)

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

@ -388,7 +388,6 @@ protected:
nsIWebShellContainer* mContainer;
nsIDeviceContext* mDeviceContext;
nsIPref* mPrefs;
nsIWidget* mWindow;
nsIDocumentLoader* mDocLoader;
@ -627,7 +626,6 @@ nsWebShell::~nsWebShell()
NS_IF_RELEASE(mThreadEventQueue);
mContentViewer=nsnull;
NS_IF_RELEASE(mDeviceContext);
NS_IF_RELEASE(mPrefs);
NS_IF_RELEASE(mContainer);
if (mScriptGlobal) {
@ -1051,9 +1049,7 @@ nsWebShell::HandleEvent(nsGUIEvent *aEvent)
NS_IMETHODIMP
nsWebShell::GetPrefs(nsIPref*& aPrefs)
{
aPrefs = mPrefs;
NS_IF_ADDREF(aPrefs);
return NS_OK;
return nsDocShell::GetPrefs(&aPrefs);
}
NS_IMETHODIMP
@ -3782,19 +3778,12 @@ NS_IMETHODIMP nsWebShell::SetLoadCookie(nsISupports * aLoadCookie)
NS_IMETHODIMP nsWebShell::GetPrefs(nsIPref** aPrefs)
{
NS_ENSURE_ARG_POINTER(aPrefs);
*aPrefs = mPrefs;
NS_IF_ADDREF(*aPrefs);
return NS_OK;
return nsDocShell::GetPrefs(aPrefs);
}
NS_IMETHODIMP nsWebShell::SetPrefs(nsIPref* aPrefs)
{
NS_IF_RELEASE(mPrefs);
mPrefs = aPrefs;
NS_IF_ADDREF(mPrefs);
return NS_OK;
return nsDocShell::SetPrefs(aPrefs);
}
NS_IMETHODIMP nsWebShell::GetZoom(float* aZoom)