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);