зеркало из https://github.com/mozilla/pjs.git
Fixed it so prompts could come up. Was missing the ability to QI properly.
This commit is contained in:
Родитель
d3027be936
Коммит
e3814a865f
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче