зеркало из https://github.com/mozilla/gecko-dev.git
Added nsIDOMNSRange method with InsertFragment method. Stub implementation for now.
This commit is contained in:
Родитель
9a86a33fe8
Коммит
02829b3ff6
|
@ -290,6 +290,12 @@ nsresult nsRange::QueryInterface(const nsIID& aIID,
|
|||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsIDOMNSRange::GetIID()))
|
||||
{
|
||||
*aInstancePtrResult = (void*)(nsIDOMNSRange*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kIScriptObjectOwnerIID)) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
*aInstancePtrResult = (void*) tmp;
|
||||
|
@ -1670,6 +1676,18 @@ nsresult nsRange::TextOwnerChanged(nsIContent* aTextNode, PRInt32 aStartChanged,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// nsIDOMNSRange interface
|
||||
NS_IMETHODIMP
|
||||
nsRange::InsertFragment(const nsString& aFragment)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("InsertFragment: not yet implemented!!\n");
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// BEGIN nsIScriptContextOwner interface implementations
|
||||
NS_IMETHODIMP
|
||||
nsRange::GetScriptObject(nsIScriptContext *aContext, void** aScriptObject)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMNSRange.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsIContent.h"
|
||||
|
@ -30,6 +31,7 @@
|
|||
class nsVoidArray;
|
||||
|
||||
class nsRange : public nsIDOMRange,
|
||||
public nsIDOMNSRange,
|
||||
public nsIScriptObjectOwner
|
||||
{
|
||||
public:
|
||||
|
@ -81,6 +83,9 @@ public:
|
|||
|
||||
NS_IMETHOD ToString(nsString& aReturn);
|
||||
|
||||
// nsIDOMNSRange interface
|
||||
NS_IMETHOD InsertFragment(const nsString& aFragment);
|
||||
|
||||
/*BEGIN nsIScriptObjectOwner interface implementations*/
|
||||
NS_IMETHOD GetScriptObject(nsIScriptContext *aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
|
|
@ -290,6 +290,12 @@ nsresult nsRange::QueryInterface(const nsIID& aIID,
|
|||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsIDOMNSRange::GetIID()))
|
||||
{
|
||||
*aInstancePtrResult = (void*)(nsIDOMNSRange*)this;
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(kIScriptObjectOwnerIID)) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
*aInstancePtrResult = (void*) tmp;
|
||||
|
@ -1670,6 +1676,18 @@ nsresult nsRange::TextOwnerChanged(nsIContent* aTextNode, PRInt32 aStartChanged,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// nsIDOMNSRange interface
|
||||
NS_IMETHODIMP
|
||||
nsRange::InsertFragment(const nsString& aFragment)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("InsertFragment: not yet implemented!!\n");
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// BEGIN nsIScriptContextOwner interface implementations
|
||||
NS_IMETHODIMP
|
||||
nsRange::GetScriptObject(nsIScriptContext *aContext, void** aScriptObject)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIDOMNSRange.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsIContent.h"
|
||||
|
@ -30,6 +31,7 @@
|
|||
class nsVoidArray;
|
||||
|
||||
class nsRange : public nsIDOMRange,
|
||||
public nsIDOMNSRange,
|
||||
public nsIScriptObjectOwner
|
||||
{
|
||||
public:
|
||||
|
@ -81,6 +83,9 @@ public:
|
|||
|
||||
NS_IMETHOD ToString(nsString& aReturn);
|
||||
|
||||
// nsIDOMNSRange interface
|
||||
NS_IMETHOD InsertFragment(const nsString& aFragment);
|
||||
|
||||
/*BEGIN nsIScriptObjectOwner interface implementations*/
|
||||
NS_IMETHOD GetScriptObject(nsIScriptContext *aContext, void** aScriptObject);
|
||||
NS_IMETHOD SetScriptObject(void *aScriptObject);
|
||||
|
|
Загрузка…
Ссылка в новой задаче