Fixed it so prompts could come up. Was missing the ability to QI properly.

This commit is contained in:
tbogard%aol.net 2000-02-08 16:11:10 +00:00
Родитель 1aa3d662b7
Коммит 4e6803a14f
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -31,6 +31,7 @@
#include "nsIDocShellTreeItem.h"
// Interfaces needed to include
#include "nsIPrompt.h"
#include "nsIWindowMediator.h"
// CIDs
@ -71,9 +72,9 @@ NS_IMETHODIMP nsChromeTreeOwner::GetInterface(const nsIID& aIID, void** aSink)
{
NS_ENSURE_ARG_POINTER(aSink);
// if(aIID.Equals(NS_GET_IID(nsISomeInterface)))
// *aSink = NS_STATIC_CAST(nsISomeInterface*, this);
// else
if(aIID.Equals(NS_GET_IID(nsIPrompt)))
return mXULWindow->QueryInterface(aIID, aSink);
else
return QueryInterface(aIID, aSink);
NS_IF_ADDREF(((nsISupports*)*aSink));

Просмотреть файл

@ -33,6 +33,7 @@
#include "nsIDOMElement.h"
#include "nsIDOMNodeList.h"
#include "nsIDOMXULElement.h"
#include "nsIPrompt.h"
#include "nsIWindowMediator.h"
// CIDs
@ -77,6 +78,8 @@ NS_IMETHODIMP nsContentTreeOwner::GetInterface(const nsIID& aIID, void** aSink)
if(aIID.Equals(NS_GET_IID(nsIWebBrowserChrome)))
*aSink = NS_STATIC_CAST(nsIWebBrowserChrome*, this);
else if(aIID.Equals(NS_GET_IID(nsIPrompt)))
return mXULWindow->QueryInterface(aIID, aSink);
else
return QueryInterface(aIID, aSink);