diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 5845dcb4ff5..829d0bdb26e 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -446,8 +446,6 @@ protected: const char* aContentType, const char* aCommand, nsIStreamListener** aResult); - float mZoom; - static nsIPluginHost *mPluginHost; static nsIPluginManager *mPluginManager; static PRUint32 mPluginInitCnt; @@ -3767,49 +3765,12 @@ NS_IMETHODIMP nsWebShell::SetLoadCookie(nsISupports * aLoadCookie) NS_IMETHODIMP nsWebShell::GetZoom(float* aZoom) { - *aZoom = mZoom; - return NS_OK; + return nsDocShell::GetZoom(aZoom); } NS_IMETHODIMP nsWebShell::SetZoom(float aZoom) { - mZoom = aZoom; - - if (mDeviceContext) - mDeviceContext->SetZoom(mZoom); - - if (mContentViewer) { - nsIDocumentViewer* docv = nsnull; - mContentViewer->QueryInterface(kIDocumentViewerIID, (void**) &docv); - if (nsnull != docv) { - nsIPresContext* cx = nsnull; - docv->GetPresContext(cx); - if (nsnull != cx) { - nsIPresShell *shell = nsnull; - cx->GetShell(&shell); - if (nsnull != shell) { - nsIViewManager *vm = nsnull; - shell->GetViewManager(&vm); - if (nsnull != vm) { - nsIView *rootview = nsnull; - nsIScrollableView *sv = nsnull; - vm->GetRootScrollableView(&sv); - if (nsnull != sv) - sv->ComputeScrollOffsets(); - vm->GetRootView(rootview); - if (nsnull != rootview) - vm->UpdateView(rootview, 0); - NS_RELEASE(vm); - } - NS_RELEASE(shell); - } - NS_RELEASE(cx); - } - NS_RELEASE(docv); - } - } - - return NS_OK; + return nsDocShell::SetZoom(aZoom); } NS_IMETHODIMP diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 5845dcb4ff5..829d0bdb26e 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -446,8 +446,6 @@ protected: const char* aContentType, const char* aCommand, nsIStreamListener** aResult); - float mZoom; - static nsIPluginHost *mPluginHost; static nsIPluginManager *mPluginManager; static PRUint32 mPluginInitCnt; @@ -3767,49 +3765,12 @@ NS_IMETHODIMP nsWebShell::SetLoadCookie(nsISupports * aLoadCookie) NS_IMETHODIMP nsWebShell::GetZoom(float* aZoom) { - *aZoom = mZoom; - return NS_OK; + return nsDocShell::GetZoom(aZoom); } NS_IMETHODIMP nsWebShell::SetZoom(float aZoom) { - mZoom = aZoom; - - if (mDeviceContext) - mDeviceContext->SetZoom(mZoom); - - if (mContentViewer) { - nsIDocumentViewer* docv = nsnull; - mContentViewer->QueryInterface(kIDocumentViewerIID, (void**) &docv); - if (nsnull != docv) { - nsIPresContext* cx = nsnull; - docv->GetPresContext(cx); - if (nsnull != cx) { - nsIPresShell *shell = nsnull; - cx->GetShell(&shell); - if (nsnull != shell) { - nsIViewManager *vm = nsnull; - shell->GetViewManager(&vm); - if (nsnull != vm) { - nsIView *rootview = nsnull; - nsIScrollableView *sv = nsnull; - vm->GetRootScrollableView(&sv); - if (nsnull != sv) - sv->ComputeScrollOffsets(); - vm->GetRootView(rootview); - if (nsnull != rootview) - vm->UpdateView(rootview, 0); - NS_RELEASE(vm); - } - NS_RELEASE(shell); - } - NS_RELEASE(cx); - } - NS_RELEASE(docv); - } - } - - return NS_OK; + return nsDocShell::SetZoom(aZoom); } NS_IMETHODIMP