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
This commit is contained in:
@@ -1155,30 +1155,9 @@ nsWebShellWindow::ShowModal()
|
||||
// the two someday.
|
||||
NS_IMETHODIMP
|
||||
nsWebShellWindow::ShowModally(PRBool aPrepare)
|
||||
{
|
||||
nsresult rv;
|
||||
nsIEventQueue *eventQ;
|
||||
nsCOMPtr<nsIWidget> 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<nsIDOMDocument> nsWebShellWindow::GetNamedDOMDoc(const nsString & aWebS
|
||||
return domDoc;
|
||||
} // nsWebShellWindow::GetNamedDOMDoc
|
||||
|
||||
//----------------------------------------
|
||||
PRInt32 nsWebShellWindow::GetDocHeight(nsIDocument * aDoc)
|
||||
{
|
||||
nsIPresShell * presShell = aDoc->GetShellAt(0);
|
||||
if (!presShell)
|
||||
return 0;
|
||||
|
||||
nsCOMPtr<nsIPresContext> 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;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user