зеркало из https://github.com/mozilla/pjs.git
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.
This commit is contained in:
Родитель
856b7038c7
Коммит
3b8d8d7d3f
|
@ -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;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
/**
|
||||
|
|
|
@ -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<nsIDOMNode> FindNamedDOMNode(const nsString &aName, nsIDOMNode * aParent, PRInt32 & aCount, PRInt32 aEndCount);
|
||||
|
|
Загрузка…
Ссылка в новой задаче