зеркало из https://github.com/mozilla/pjs.git
new method GetExtantDocument. bug 36016 r=hyatt,pinkerton
This commit is contained in:
Родитель
3845253882
Коммит
dbbdc05407
|
@ -44,7 +44,6 @@
|
|||
#include "nsString.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDOMXULCommandDispatcher.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
|
@ -81,6 +80,9 @@ public:
|
|||
|
||||
NS_IMETHOD GetRootFocusController(nsIFocusController** aResult) = 0;
|
||||
|
||||
// GetExtantDocument provides a backdoor to the DOM GetDocument accessor
|
||||
NS_IMETHOD GetExtantDocument(nsIDOMDocument** aDocument) = 0;
|
||||
|
||||
NS_IMETHOD ReallyCloseWindow() = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -776,6 +776,15 @@ NS_IMETHODIMP GlobalWindowImpl::GetDocument(nsIDOMDocument** aDocument)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// like GetDocument, but merely fetches the document if it already exists
|
||||
NS_IMETHODIMP GlobalWindowImpl::GetExtantDocument(nsIDOMDocument** aDocument)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDocument);
|
||||
*aDocument = mDocument;
|
||||
NS_IF_ADDREF(*aDocument);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// GlobalWindowImpl::nsIDOMWindowInternal
|
||||
//*****************************************************************************
|
||||
|
|
|
@ -181,6 +181,8 @@ public:
|
|||
PRBool* aResult);
|
||||
NS_IMETHOD SetMutationListeners(PRUint32 aEventType);
|
||||
NS_IMETHOD GetRootFocusController(nsIFocusController** aResult);
|
||||
NS_IMETHOD GetExtantDocument(nsIDOMDocument** aDocument);
|
||||
|
||||
NS_IMETHOD ReallyCloseWindow();
|
||||
|
||||
// nsIDOMViewCSS
|
||||
|
|
Загрузка…
Ссылка в новой задаче