From f7d74018af4c8132c79293a5d0d42d4e5dd30713 Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Thu, 24 Feb 2000 01:39:31 +0000 Subject: [PATCH] Removed unused legacy function that is never called. Put an assert in place for people calling the old ShowModally, this is never called, but this will prevent new people from calling until it can be completely removed. r=danm. git-svn-id: svn://10.0.0.236/trunk@61554 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xpfe/appshell/src/nsWebShellWindow.cpp | 57 +------------------ mozilla/xpfe/appshell/src/nsWebShellWindow.h | 2 - 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index c4ab86d4f99..77adaf50000 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -1155,30 +1155,9 @@ nsWebShellWindow::ShowModal() // the two someday. NS_IMETHODIMP nsWebShellWindow::ShowModally(PRBool aPrepare) -{ - nsresult rv; - nsIEventQueue *eventQ; - nsCOMPtr parentWidget; - - NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueServiceCID, &rv); - if (NS_FAILED(rv)) - return rv; - - eventQ = NULL; - if (aPrepare) - eventQService->PushThreadEventQueue(&eventQ); - - parentWidget = do_QueryReferent(mParentWindow); - if (parentWidget) - parentWidget->Enable(PR_FALSE); - rv = ShowModal(); - if (parentWidget) - parentWidget->Enable(PR_TRUE); - - if (eventQ) - eventQService->PopThreadEventQueue(eventQ); - - return rv; +{ + NS_ERROR("Can't use this anymore"); + return NS_ERROR_FAILURE; } @@ -1453,36 +1432,6 @@ nsCOMPtr nsWebShellWindow::GetNamedDOMDoc(const nsString & aWebS return domDoc; } // nsWebShellWindow::GetNamedDOMDoc -//---------------------------------------- -PRInt32 nsWebShellWindow::GetDocHeight(nsIDocument * aDoc) -{ - nsIPresShell * presShell = aDoc->GetShellAt(0); - if (!presShell) - return 0; - - nsCOMPtr presContext; - presShell->GetPresContext(getter_AddRefs(presContext)); - if (presContext) { - nsRect rect; - presContext->GetVisibleArea(rect); - nsIFrame * rootFrame; - nsSize size; - presShell->GetRootFrame(&rootFrame); - if (rootFrame) { - rootFrame->GetSize(size); - float t2p; - presContext->GetTwipsToPixels(&t2p); - printf("Doc size %d,%d\n", PRInt32((float)size.width*t2p), - PRInt32((float)size.height*t2p)); - //return rect.height; - return PRInt32((float)rect.height*t2p); - //return PRInt32((float)size.height*presContext->GetTwipsToPixels()); - } - } - NS_RELEASE(presShell); - return 0; -} - //---------------------------------------- /** diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index 0f40fba0d63..a8f878ede0f 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -228,8 +228,6 @@ public: NS_DECL_NSINETPROMPT protected: - PRInt32 GetDocHeight(nsIDocument * aDoc); - void LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWindow); void DynamicLoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWindow); nsCOMPtr FindNamedDOMNode(const nsString &aName, nsIDOMNode * aParent, PRInt32 & aCount, PRInt32 aEndCount);