Updating the DOM Node interface to match the DOM Level 2 interface, only stub implemetations so far.

This commit is contained in:
jst%netscape.com 2000-04-01 13:31:23 +00:00
Родитель 3c83b6aaa7
Коммит 5fdb266f31
45 изменённых файлов: 1087 добавлений и 169 удалений

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

@ -433,6 +433,50 @@ nsDOMAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
return result;
}
NS_IMETHODIMP
nsDOMAttribute::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
nsAttributeChildList::nsAttributeChildList(nsDOMAttribute* aAttribute)

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

@ -86,26 +86,7 @@ public:
NS_IMETHOD SetValue(const nsString& aValue);
// nsIDOMNode interface
NS_IMETHOD GetNodeName(nsString& aNodeName);
NS_IMETHOD GetNodeValue(nsString& aNodeValue);
NS_IMETHOD SetNodeValue(const nsString& aNodeValue);
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes);
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes);
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild);
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild);
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling);
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_DECL_IDOMNODE
// nsIDOMAttributePrivate interface
NS_IMETHOD DropReference();

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

@ -2150,7 +2150,11 @@ nsDocument::GetPixelDimensions(nsIPresShell* aShell,
NS_IMETHODIMP
nsDocument::GetWidth(PRInt32* aWidth)
{
nsresult result;
NS_ENSURE_ARG_POINTER(aWidth);
*aWidth = 0;
nsresult result = NS_OK;
nsCOMPtr<nsIPresShell> shell;
// We make the assumption that the first presentation shell
@ -2313,6 +2317,34 @@ nsDocument::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -2522,6 +2554,20 @@ nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)

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

@ -355,24 +355,7 @@ public:
NS_IMETHOD GetHeight(PRInt32* aHeight);
// nsIDOMNode interface
NS_IMETHOD GetNodeName(nsString& aNodeName);
NS_IMETHOD GetNodeValue(nsString& aNodeValue);
NS_IMETHOD SetNodeValue(const nsString& aNodeValue);
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes);
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes);
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild);
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild);
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling);
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_DECL_IDOMNODE
// nsIDOMEventReceiver interface
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);

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

@ -91,6 +91,13 @@ public:
NS_IMETHOD HasChildNodes(PRBool* aReturn)
{ return mInner.HasChildNodes(aReturn); }
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD GetPrefix(nsString& aPrefix);
NS_IMETHOD SetPrefix(const nsString& aPrefix);
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI);
NS_IMETHOD GetLocalName(nsString& aLocalName);
NS_IMETHOD Normalize();
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// interface nsIScriptObjectOwner
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
@ -335,6 +342,35 @@ nsDocumentFragment::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
}
NS_IMETHODIMP
nsDocumentFragment::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
aPrefix.Truncate();
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return GetNodeName(aLocalName);
}
NS_IMETHODIMP
nsDocumentFragment::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
@ -348,6 +384,22 @@ nsDocumentFragment::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
NS_IMETHODIMP
nsDocumentFragment::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetScriptObject(nsIScriptContext* aContext,
void** aScriptObject)

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

@ -211,6 +211,43 @@ nsGenericDOMDataNode::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
}
nsresult
nsGenericDOMDataNode::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_DOM_NAMESPACE_ERR;
}
nsresult
nsGenericDOMDataNode::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::Supports(const nsString& aFeature,
const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
#if 0
nsresult
nsGenericDOMDataNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn)

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

@ -118,6 +118,12 @@ struct nsGenericDOMDataNode {
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetNamespaceURI(nsString& aNamespaceURI);
nsresult GetPrefix(nsString& aPrefix);
nsresult SetPrefix(const nsString& aPrefix);
nsresult Normalize();
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// Implementation for nsIDOMCharacterData
nsresult GetData(nsString& aData);
@ -273,6 +279,9 @@ struct nsGenericDOMDataNode {
*/
#define NS_IMPL_IDOMNODE_USING_GENERIC_DOM_DATA(_g) \
NS_IMETHOD GetNodeName(nsString& aNodeName); \
NS_IMETHOD GetLocalName(nsString& aLocalName) { \
return GetNodeName(aLocalName); \
} \
NS_IMETHOD GetNodeValue(nsString& aNodeValue) { \
return _g.GetNodeValue(aNodeValue); \
} \
@ -321,6 +330,22 @@ struct nsGenericDOMDataNode {
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return _g.GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI) { \
return _g.GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsString& aPrefix) { \
return _g.GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsString& aPrefix) { \
return _g.SetPrefix(aPrefix); \
} \
NS_IMETHOD Normalize() { \
return NS_OK; \
} \
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion,\
PRBool* aReturn) { \
return _g.Supports(aFeature, aVersion, aReturn); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
#define NS_IMPL_IDOMCHARACTERDATA_USING_GENERIC_DOM_DATA(_g) \

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

@ -457,6 +457,13 @@ nsGenericElement::GetNodeName(nsString& aNodeName)
return GetTagName(aNodeName);
}
nsresult
nsGenericElement::GetLocalName(nsString& aNodeName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericElement::GetNodeValue(nsString& aNodeValue)
{

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

@ -136,6 +136,8 @@ public:
nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling);
nsresult GetNextSibling(nsIDOMNode** aNextSibling);
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetLocalName(nsString& aLocalName);
nsresult Normalize();
// Implementation for nsIDOMElement
nsresult GetTagName(nsString& aTagName);
@ -148,7 +150,6 @@ public:
nsresult RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn);
nsresult GetElementsByTagName(const nsString& aTagname,
nsIDOMNodeList** aReturn);
nsresult Normalize();
// nsIScriptObjectOwner interface
nsresult GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
@ -343,6 +344,9 @@ public:
*
* Note that classes using this macro will need to implement:
* NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
* Note:
* GetNamespaceURI, GetPrefix, SetPrefix, Normalize and Supports must be
* implemented in a super class of this one.
*/
#define NS_IMPL_IDOMNODE_USING_GENERIC(_g) \
NS_IMETHOD GetNodeName(nsString& aNodeName) { \
@ -381,6 +385,18 @@ public:
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { \
return _g.GetAttributes(aAttributes); \
} \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI) { \
return _g.GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsString& aPrefix) { \
return _g.GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsString& aPrefix) { \
return _g.SetPrefix(aPrefix); \
} \
NS_IMETHOD GetLocalName(nsString& aLocalName) { \
return _g.GetLocalName(aLocalName); \
} \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, \
nsIDOMNode** aReturn) { \
return _g.InsertBefore(aNewChild, aRefChild, aReturn); \
@ -398,7 +414,14 @@ public:
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return _g.GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); \
NS_IMETHOD Normalize() { \
return _g.Normalize(); \
} \
NS_IMETHOD Supports(const nsString& aFeature, \
const nsString& aVersion, PRBool* aReturn) { \
return _g.Supports(aFeature, aVersion, aReturn); \
}
/**
* Implement the nsIDOMElement API by forwarding the methods to a
@ -431,9 +454,6 @@ public:
NS_IMETHOD GetElementsByTagName(const nsString& aTagname, \
nsIDOMNodeList** aReturn) { \
return _g.GetElementsByTagName(aTagname, aReturn); \
} \
NS_IMETHOD Normalize() { \
return _g.Normalize(); \
}
/**

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

@ -68,6 +68,11 @@ public:
// Implementation for nsIDOMNode
nsresult GetNodeName(nsString& aNodeName);
nsresult GetNamespaceURI(nsString& aNamespaceURI) { return NS_OK; }; //xxxxxx
nsresult GetPrefix(nsString& aPrefix) { return NS_OK; }; //xxxxxx
nsresult SetPrefix(const nsString& aPrefix) { return NS_OK; }; //xxxxxx
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn) { return NS_OK; } // xxxxxx
// Implementation for nsIDOMElement
nsresult GetAttribute(const nsString& aName, nsString& aReturn)

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

@ -122,10 +122,6 @@ public:
nsIDOMNodeList** aReturn) {
return mInner.GetElementsByTagName(aTagname, aReturn);
}
NS_IMETHOD Normalize() {
return mInner.Normalize();
}
// nsIDOMHTMLElement

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

@ -102,10 +102,6 @@ public:
nsIDOMNodeList** aReturn) {
return mInner.GetElementsByTagName(aTagname, aReturn);
}
NS_IMETHOD Normalize() {
return mInner.Normalize();
}
// nsIDOMHTMLElement
NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner)

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

@ -1348,6 +1348,30 @@ nsHTMLDocument::GetNodeType(PRUint16* aNodeType)
return nsDocument::GetNodeType(aNodeType);
}
NS_IMETHODIMP
nsHTMLDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
return nsDocument::GetNamespaceURI(aNamespaceURI);
}
NS_IMETHODIMP
nsHTMLDocument::GetPrefix(nsString& aPrefix)
{
return nsDocument::GetPrefix(aPrefix);
}
NS_IMETHODIMP
nsHTMLDocument::SetPrefix(const nsString& aPrefix)
{
return nsDocument::SetPrefix(aPrefix);
}
NS_IMETHODIMP
nsHTMLDocument::GetLocalName(nsString& aLocalName)
{
return nsDocument::GetLocalName(aLocalName);
}
NS_IMETHODIMP
nsHTMLDocument::GetParentNode(nsIDOMNode** aParentNode)
{
@ -1384,6 +1408,19 @@ nsHTMLDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return nsDocument::CloneNode(aDeep, aReturn);
}
NS_IMETHODIMP
nsHTMLDocument::Normalize()
{
return nsDocument::Normalize();
}
NS_IMETHODIMP
nsHTMLDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
return nsDocument::Supports(aFeature, aVersion, aReturn);
}
//
// nsIDOMHTMLDocument interface implementation

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

@ -366,6 +366,34 @@ nsXULAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -404,6 +432,20 @@ nsXULAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::Normalize()
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
// nsIDOMAttr interface

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

@ -1083,6 +1083,38 @@ nsXULElement::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
NS_IMETHODIMP
nsXULElement::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -1361,6 +1393,23 @@ nsXULElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
}
NS_IMETHODIMP
nsXULElement::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
// nsIDOMElement interface
@ -1535,14 +1584,6 @@ nsXULElement::GetElementsByAttribute(const nsString& aAttribute,
}
NS_IMETHODIMP
nsXULElement::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
// nsIXMLContent interface

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

@ -3133,6 +3133,38 @@ nsXULDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
NS_IMETHODIMP
nsXULDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me");
return GetNodeName(aLocalName);
}
NS_IMETHODIMP
nsXULDocument::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -3174,6 +3206,23 @@ nsXULDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
}
NS_IMETHODIMP
nsXULDocument::Normalize()
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
//
// nsIJSScriptObject interface

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

@ -364,11 +364,17 @@ public:
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI);
NS_IMETHOD GetPrefix(nsString& aPrefix);
NS_IMETHOD SetPrefix(const nsString& aPrefix);
NS_IMETHOD GetLocalName(nsString& aLocalName);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD Normalize();
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn);
// nsIJSScriptObject interface
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,

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

@ -55,8 +55,6 @@ public:
NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn)=0;
NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn)=0;
NS_IMETHOD Normalize()=0;
};
@ -69,7 +67,6 @@ public:
NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn); \
NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn); \
NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn); \
NS_IMETHOD Normalize(); \
@ -82,7 +79,6 @@ public:
NS_IMETHOD SetAttributeNode(nsIDOMAttr* aNewAttr, nsIDOMAttr** aReturn) { return _to SetAttributeNode(aNewAttr, aReturn); } \
NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn) { return _to RemoveAttributeNode(aOldAttr, aReturn); } \
NS_IMETHOD GetElementsByTagName(const nsString& aName, nsIDOMNodeList** aReturn) { return _to GetElementsByTagName(aName, aReturn); } \
NS_IMETHOD Normalize() { return _to Normalize(); } \
extern "C" NS_DOM nsresult NS_InitElementClass(nsIScriptContext *aContext, void **aPrototype);

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

@ -78,6 +78,13 @@ public:
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument)=0;
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI)=0;
NS_IMETHOD GetPrefix(nsString& aPrefix)=0;
NS_IMETHOD SetPrefix(const nsString& aPrefix)=0;
NS_IMETHOD GetLocalName(nsString& aLocalName)=0;
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)=0;
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn)=0;
@ -89,6 +96,10 @@ public:
NS_IMETHOD HasChildNodes(PRBool* aReturn)=0;
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn)=0;
NS_IMETHOD Normalize()=0;
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn)=0;
};
@ -105,12 +116,18 @@ public:
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling); \
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes); \
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument); \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI); \
NS_IMETHOD GetPrefix(nsString& aPrefix); \
NS_IMETHOD SetPrefix(const nsString& aPrefix); \
NS_IMETHOD GetLocalName(nsString& aLocalName); \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn); \
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn); \
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn); \
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn); \
NS_IMETHOD HasChildNodes(PRBool* aReturn); \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); \
NS_IMETHOD Normalize(); \
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn); \
@ -127,12 +144,18 @@ public:
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) { return _to GetNextSibling(aNextSibling); } \
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { return _to GetAttributes(aAttributes); } \
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { return _to GetOwnerDocument(aOwnerDocument); } \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI) { return _to GetNamespaceURI(aNamespaceURI); } \
NS_IMETHOD GetPrefix(nsString& aPrefix) { return _to GetPrefix(aPrefix); } \
NS_IMETHOD SetPrefix(const nsString& aPrefix) { return _to SetPrefix(aPrefix); } \
NS_IMETHOD GetLocalName(nsString& aLocalName) { return _to GetLocalName(aLocalName); } \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn) { return _to InsertBefore(aNewChild, aRefChild, aReturn); } \
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { return _to ReplaceChild(aNewChild, aOldChild, aReturn); } \
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { return _to RemoveChild(aOldChild, aReturn); } \
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn) { return _to AppendChild(aNewChild, aReturn); } \
NS_IMETHOD HasChildNodes(PRBool* aReturn) { return _to HasChildNodes(aReturn); } \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { return _to CloneNode(aDeep, aReturn); } \
NS_IMETHOD Normalize() { return _to Normalize(); } \
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn) { return _to Supports(aFeature, aVersion, aReturn); } \
extern "C" NS_DOM nsresult NS_InitNodeClass(nsIScriptContext *aContext, void **aPrototype);

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

@ -15,5 +15,4 @@
Attr removeAttributeNode(in Attr oldAttr)
raises(DOMException);
NodeList getElementsByTagName(in DOMString name);
void normalize();
};

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

@ -27,6 +27,7 @@
readonly attribute Node previousSibling;
readonly attribute Node nextSibling;
readonly attribute NamedNodeMap attributes;
// Modified in DOM Level 2:
readonly attribute Document ownerDocument;
Node insertBefore(in Node newChild,
in Node refChild)
@ -40,7 +41,20 @@
raises(DOMException);
boolean hasChildNodes();
Node cloneNode(in boolean deep);
};
// Introduced in DOM Level 2:
void normalize();
// Introduced in DOM Level 2:
boolean supports(in DOMString feature,
in DOMString version);
// Introduced in DOM Level 2:
readonly attribute DOMString namespaceURI;
// Introduced in DOM Level 2:
attribute DOMString prefix;
// raises(DOMException) on setting
// Introduced in DOM Level 2:
readonly attribute DOMString localName;
};
interface EventTarget {
/* IID: { 0x1c773b30, 0xd1cf, 0x11d2, \
@ -48,4 +62,4 @@
void addEventListener(in DOMString type, in function EventListener listener, in boolean useCapture);
void removeEventListener(in DOMString type, in function EventListener listener, in boolean useCapture);
};
};

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

@ -234,7 +234,6 @@ enum nsDOMProp {
NS_DOM_PROP_ELEMENT_GETATTRIBUTE,
NS_DOM_PROP_ELEMENT_GETATTRIBUTENODE,
NS_DOM_PROP_ELEMENT_GETELEMENTSBYTAGNAME,
NS_DOM_PROP_ELEMENT_NORMALIZE,
NS_DOM_PROP_ELEMENT_REMOVEATTRIBUTE,
NS_DOM_PROP_ELEMENT_REMOVEATTRIBUTENODE,
NS_DOM_PROP_ELEMENT_SETATTRIBUTE,
@ -675,15 +674,20 @@ enum nsDOMProp {
NS_DOM_PROP_NODE_HASCHILDNODES,
NS_DOM_PROP_NODE_INSERTBEFORE,
NS_DOM_PROP_NODE_LASTCHILD,
NS_DOM_PROP_NODE_LOCALNAME,
NS_DOM_PROP_NODE_NAMESPACEURI,
NS_DOM_PROP_NODE_NEXTSIBLING,
NS_DOM_PROP_NODE_NODENAME,
NS_DOM_PROP_NODE_NODETYPE,
NS_DOM_PROP_NODE_NODEVALUE,
NS_DOM_PROP_NODE_NORMALIZE,
NS_DOM_PROP_NODE_OWNERDOCUMENT,
NS_DOM_PROP_NODE_PARENTNODE,
NS_DOM_PROP_NODE_PREFIX,
NS_DOM_PROP_NODE_PREVIOUSSIBLING,
NS_DOM_PROP_NODE_REMOVECHILD,
NS_DOM_PROP_NODE_REPLACECHILD,
NS_DOM_PROP_NODE_SUPPORTS,
NS_DOM_PROP_NODELIST_ITEM,
NS_DOM_PROP_NODELIST_LENGTH,
NS_DOM_PROP_NOTATION_PUBLICID,

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

@ -233,7 +233,6 @@
"element.getattribute", \
"element.getattributenode", \
"element.getelementsbytagname", \
"element.normalize", \
"element.removeattribute", \
"element.removeattributenode", \
"element.setattribute", \
@ -674,15 +673,20 @@
"node.haschildnodes", \
"node.insertbefore", \
"node.lastchild", \
"node.localname", \
"node.namespaceuri", \
"node.nextsibling", \
"node.nodename", \
"node.nodetype", \
"node.nodevalue", \
"node.normalize", \
"node.ownerdocument", \
"node.parentnode", \
"node.prefix", \
"node.previoussibling", \
"node.removechild", \
"node.replacechild", \
"node.supports", \
"nodelist.item", \
"nodelist.length", \
"notation.publicid", \

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

@ -469,41 +469,6 @@ ElementGetElementsByTagName(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
}
//
// Native method Normalize
//
PR_STATIC_CALLBACK(JSBool)
ElementNormalize(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMElement *nativeThis = (nsIDOMElement*)nsJSUtils::nsGetNativeThis(cx, obj);
nsresult result = NS_OK;
// If there's no private data, this must be the prototype, so ignore
if (nsnull == nativeThis) {
return JS_TRUE;
}
{
*rval = JSVAL_NULL;
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
if (!secMan)
return PR_FALSE;
result = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_ELEMENT_NORMALIZE, PR_FALSE);
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
result = nativeThis->Normalize();
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
*rval = JSVAL_VOID;
}
return JS_TRUE;
}
/***********************************************************************/
//
// class for Element
@ -546,7 +511,6 @@ static JSFunctionSpec ElementMethods[] =
{"setAttributeNode", ElementSetAttributeNode, 1},
{"removeAttributeNode", ElementRemoveAttributeNode, 1},
{"getElementsByTagName", ElementGetElementsByTagName, 1},
{"normalize", ElementNormalize, 0},
{0}
};

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

@ -66,7 +66,10 @@ enum Node_slots {
NODE_PREVIOUSSIBLING = -8,
NODE_NEXTSIBLING = -9,
NODE_ATTRIBUTES = -10,
NODE_OWNERDOCUMENT = -11
NODE_OWNERDOCUMENT = -11,
NODE_NAMESPACEURI = -12,
NODE_PREFIX = -13,
NODE_LOCALNAME = -14
};
/***********************************************************************/
@ -229,6 +232,42 @@ GetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
break;
}
case NODE_NAMESPACEURI:
{
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_NAMESPACEURI, PR_FALSE);
if (NS_SUCCEEDED(rv)) {
nsAutoString prop;
rv = a->GetNamespaceURI(prop);
if (NS_SUCCEEDED(rv)) {
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
}
}
break;
}
case NODE_PREFIX:
{
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_PREFIX, PR_FALSE);
if (NS_SUCCEEDED(rv)) {
nsAutoString prop;
rv = a->GetPrefix(prop);
if (NS_SUCCEEDED(rv)) {
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
}
}
break;
}
case NODE_LOCALNAME:
{
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_LOCALNAME, PR_FALSE);
if (NS_SUCCEEDED(rv)) {
nsAutoString prop;
rv = a->GetLocalName(prop);
if (NS_SUCCEEDED(rv)) {
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
}
}
break;
}
default:
return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, obj, id, vp);
}
@ -274,6 +313,18 @@ SetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
break;
}
case NODE_PREFIX:
{
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_PREFIX, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
nsAutoString prop;
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
rv = a->SetPrefix(prop);
}
break;
}
default:
return nsJSUtils::nsCallJSScriptObjectSetProperty(a, cx, obj, id, vp);
}
@ -606,6 +657,85 @@ NodeCloneNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval
}
//
// Native method Normalize
//
PR_STATIC_CALLBACK(JSBool)
NodeNormalize(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMNode *nativeThis = (nsIDOMNode*)nsJSUtils::nsGetNativeThis(cx, obj);
nsresult result = NS_OK;
// If there's no private data, this must be the prototype, so ignore
if (nsnull == nativeThis) {
return JS_TRUE;
}
{
*rval = JSVAL_NULL;
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
if (!secMan)
return PR_FALSE;
result = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_NORMALIZE, PR_FALSE);
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
result = nativeThis->Normalize();
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
*rval = JSVAL_VOID;
}
return JS_TRUE;
}
//
// Native method Supports
//
PR_STATIC_CALLBACK(JSBool)
NodeSupports(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsIDOMNode *nativeThis = (nsIDOMNode*)nsJSUtils::nsGetNativeThis(cx, obj);
nsresult result = NS_OK;
PRBool nativeRet;
nsAutoString b0;
nsAutoString b1;
// If there's no private data, this must be the prototype, so ignore
if (nsnull == nativeThis) {
return JS_TRUE;
}
{
*rval = JSVAL_NULL;
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
if (!secMan)
return PR_FALSE;
result = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_NODE_SUPPORTS, PR_FALSE);
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
if (argc < 2) {
return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR);
}
nsJSUtils::nsConvertJSValToString(b0, cx, argv[0]);
nsJSUtils::nsConvertJSValToString(b1, cx, argv[1]);
result = nativeThis->Supports(b0, b1, &nativeRet);
if (NS_FAILED(result)) {
return nsJSUtils::nsReportError(cx, obj, result);
}
*rval = BOOLEAN_TO_JSVAL(nativeRet);
}
return JS_TRUE;
}
//
// Native method AddEventListener
//
@ -756,6 +886,9 @@ static JSPropertySpec NodeProperties[] =
{"nextSibling", NODE_NEXTSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY},
{"attributes", NODE_ATTRIBUTES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"ownerDocument", NODE_OWNERDOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"namespaceURI", NODE_NAMESPACEURI, JSPROP_ENUMERATE | JSPROP_READONLY},
{"prefix", NODE_PREFIX, JSPROP_ENUMERATE},
{"localName", NODE_LOCALNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
@ -771,6 +904,8 @@ static JSFunctionSpec NodeMethods[] =
{"appendChild", NodeAppendChild, 1},
{"hasChildNodes", NodeHasChildNodes, 0},
{"cloneNode", NodeCloneNode, 1},
{"normalize", NodeNormalize, 0},
{"supports", NodeSupports, 2},
{"addEventListener", EventTargetAddEventListener, 3},
{"removeEventListener", EventTargetRemoveEventListener, 3},
{0}

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

@ -433,6 +433,50 @@ nsDOMAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
return result;
}
NS_IMETHODIMP
nsDOMAttribute::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDOMAttribute::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
nsAttributeChildList::nsAttributeChildList(nsDOMAttribute* aAttribute)

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

@ -86,26 +86,7 @@ public:
NS_IMETHOD SetValue(const nsString& aValue);
// nsIDOMNode interface
NS_IMETHOD GetNodeName(nsString& aNodeName);
NS_IMETHOD GetNodeValue(nsString& aNodeValue);
NS_IMETHOD SetNodeValue(const nsString& aNodeValue);
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes);
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes);
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild);
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild);
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling);
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_DECL_IDOMNODE
// nsIDOMAttributePrivate interface
NS_IMETHOD DropReference();

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

@ -2150,7 +2150,11 @@ nsDocument::GetPixelDimensions(nsIPresShell* aShell,
NS_IMETHODIMP
nsDocument::GetWidth(PRInt32* aWidth)
{
nsresult result;
NS_ENSURE_ARG_POINTER(aWidth);
*aWidth = 0;
nsresult result = NS_OK;
nsCOMPtr<nsIPresShell> shell;
// We make the assumption that the first presentation shell
@ -2313,6 +2317,34 @@ nsDocument::GetAttributes(nsIDOMNamedNodeMap** aAttributes)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -2522,6 +2554,20 @@ nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return NS_OK;
}
NS_IMETHODIMP
nsDocument::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)

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

@ -355,24 +355,7 @@ public:
NS_IMETHOD GetHeight(PRInt32* aHeight);
// nsIDOMNode interface
NS_IMETHOD GetNodeName(nsString& aNodeName);
NS_IMETHOD GetNodeValue(nsString& aNodeValue);
NS_IMETHOD SetNodeValue(const nsString& aNodeValue);
NS_IMETHOD GetNodeType(PRUint16* aNodeType);
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes);
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes);
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild);
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild);
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling);
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_DECL_IDOMNODE
// nsIDOMEventReceiver interface
NS_IMETHOD AddEventListenerByIID(nsIDOMEventListener *aListener, const nsIID& aIID);

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

@ -91,6 +91,13 @@ public:
NS_IMETHOD HasChildNodes(PRBool* aReturn)
{ return mInner.HasChildNodes(aReturn); }
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD GetPrefix(nsString& aPrefix);
NS_IMETHOD SetPrefix(const nsString& aPrefix);
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI);
NS_IMETHOD GetLocalName(nsString& aLocalName);
NS_IMETHOD Normalize();
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// interface nsIScriptObjectOwner
NS_IMETHOD GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
@ -335,6 +342,35 @@ nsDocumentFragment::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
}
NS_IMETHODIMP
nsDocumentFragment::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
aPrefix.Truncate();
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return GetNodeName(aLocalName);
}
NS_IMETHODIMP
nsDocumentFragment::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
@ -348,6 +384,22 @@ nsDocumentFragment::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
NS_IMETHODIMP
nsDocumentFragment::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
NS_IMETHODIMP
nsDocumentFragment::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDocumentFragment::GetScriptObject(nsIScriptContext* aContext,
void** aScriptObject)

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

@ -211,6 +211,43 @@ nsGenericDOMDataNode::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
}
nsresult
nsGenericDOMDataNode::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_DOM_NAMESPACE_ERR;
}
nsresult
nsGenericDOMDataNode::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_OK;
}
nsresult
nsGenericDOMDataNode::Supports(const nsString& aFeature,
const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
#if 0
nsresult
nsGenericDOMDataNode::Equals(nsIDOMNode* aNode, PRBool aDeep, PRBool* aReturn)

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

@ -118,6 +118,12 @@ struct nsGenericDOMDataNode {
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetNamespaceURI(nsString& aNamespaceURI);
nsresult GetPrefix(nsString& aPrefix);
nsresult SetPrefix(const nsString& aPrefix);
nsresult Normalize();
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// Implementation for nsIDOMCharacterData
nsresult GetData(nsString& aData);
@ -273,6 +279,9 @@ struct nsGenericDOMDataNode {
*/
#define NS_IMPL_IDOMNODE_USING_GENERIC_DOM_DATA(_g) \
NS_IMETHOD GetNodeName(nsString& aNodeName); \
NS_IMETHOD GetLocalName(nsString& aLocalName) { \
return GetNodeName(aLocalName); \
} \
NS_IMETHOD GetNodeValue(nsString& aNodeValue) { \
return _g.GetNodeValue(aNodeValue); \
} \
@ -321,6 +330,22 @@ struct nsGenericDOMDataNode {
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return _g.GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI) { \
return _g.GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsString& aPrefix) { \
return _g.GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsString& aPrefix) { \
return _g.SetPrefix(aPrefix); \
} \
NS_IMETHOD Normalize() { \
return NS_OK; \
} \
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion,\
PRBool* aReturn) { \
return _g.Supports(aFeature, aVersion, aReturn); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
#define NS_IMPL_IDOMCHARACTERDATA_USING_GENERIC_DOM_DATA(_g) \

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

@ -457,6 +457,13 @@ nsGenericElement::GetNodeName(nsString& aNodeName)
return GetTagName(aNodeName);
}
nsresult
nsGenericElement::GetLocalName(nsString& aNodeName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericElement::GetNodeValue(nsString& aNodeValue)
{

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

@ -136,6 +136,8 @@ public:
nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling);
nsresult GetNextSibling(nsIDOMNode** aNextSibling);
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetLocalName(nsString& aLocalName);
nsresult Normalize();
// Implementation for nsIDOMElement
nsresult GetTagName(nsString& aTagName);
@ -148,7 +150,6 @@ public:
nsresult RemoveAttributeNode(nsIDOMAttr* aOldAttr, nsIDOMAttr** aReturn);
nsresult GetElementsByTagName(const nsString& aTagname,
nsIDOMNodeList** aReturn);
nsresult Normalize();
// nsIScriptObjectOwner interface
nsresult GetScriptObject(nsIScriptContext* aContext, void** aScriptObject);
@ -343,6 +344,9 @@ public:
*
* Note that classes using this macro will need to implement:
* NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
* Note:
* GetNamespaceURI, GetPrefix, SetPrefix, Normalize and Supports must be
* implemented in a super class of this one.
*/
#define NS_IMPL_IDOMNODE_USING_GENERIC(_g) \
NS_IMETHOD GetNodeName(nsString& aNodeName) { \
@ -381,6 +385,18 @@ public:
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { \
return _g.GetAttributes(aAttributes); \
} \
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI) { \
return _g.GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsString& aPrefix) { \
return _g.GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsString& aPrefix) { \
return _g.SetPrefix(aPrefix); \
} \
NS_IMETHOD GetLocalName(nsString& aLocalName) { \
return _g.GetLocalName(aLocalName); \
} \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, \
nsIDOMNode** aReturn) { \
return _g.InsertBefore(aNewChild, aRefChild, aReturn); \
@ -398,7 +414,14 @@ public:
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return _g.GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn); \
NS_IMETHOD Normalize() { \
return _g.Normalize(); \
} \
NS_IMETHOD Supports(const nsString& aFeature, \
const nsString& aVersion, PRBool* aReturn) { \
return _g.Supports(aFeature, aVersion, aReturn); \
}
/**
* Implement the nsIDOMElement API by forwarding the methods to a
@ -431,9 +454,6 @@ public:
NS_IMETHOD GetElementsByTagName(const nsString& aTagname, \
nsIDOMNodeList** aReturn) { \
return _g.GetElementsByTagName(aTagname, aReturn); \
} \
NS_IMETHOD Normalize() { \
return _g.Normalize(); \
}
/**

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

@ -68,6 +68,11 @@ public:
// Implementation for nsIDOMNode
nsresult GetNodeName(nsString& aNodeName);
nsresult GetNamespaceURI(nsString& aNamespaceURI) { return NS_OK; }; //xxxxxx
nsresult GetPrefix(nsString& aPrefix) { return NS_OK; }; //xxxxxx
nsresult SetPrefix(const nsString& aPrefix) { return NS_OK; }; //xxxxxx
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn) { return NS_OK; } // xxxxxx
// Implementation for nsIDOMElement
nsresult GetAttribute(const nsString& aName, nsString& aReturn)

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

@ -122,10 +122,6 @@ public:
nsIDOMNodeList** aReturn) {
return mInner.GetElementsByTagName(aTagname, aReturn);
}
NS_IMETHOD Normalize() {
return mInner.Normalize();
}
// nsIDOMHTMLElement

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

@ -102,10 +102,6 @@ public:
nsIDOMNodeList** aReturn) {
return mInner.GetElementsByTagName(aTagname, aReturn);
}
NS_IMETHOD Normalize() {
return mInner.Normalize();
}
// nsIDOMHTMLElement
NS_IMPL_IDOMHTMLELEMENT_USING_GENERIC(mInner)

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

@ -1348,6 +1348,30 @@ nsHTMLDocument::GetNodeType(PRUint16* aNodeType)
return nsDocument::GetNodeType(aNodeType);
}
NS_IMETHODIMP
nsHTMLDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
return nsDocument::GetNamespaceURI(aNamespaceURI);
}
NS_IMETHODIMP
nsHTMLDocument::GetPrefix(nsString& aPrefix)
{
return nsDocument::GetPrefix(aPrefix);
}
NS_IMETHODIMP
nsHTMLDocument::SetPrefix(const nsString& aPrefix)
{
return nsDocument::SetPrefix(aPrefix);
}
NS_IMETHODIMP
nsHTMLDocument::GetLocalName(nsString& aLocalName)
{
return nsDocument::GetLocalName(aLocalName);
}
NS_IMETHODIMP
nsHTMLDocument::GetParentNode(nsIDOMNode** aParentNode)
{
@ -1384,6 +1408,19 @@ nsHTMLDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return nsDocument::CloneNode(aDeep, aReturn);
}
NS_IMETHODIMP
nsHTMLDocument::Normalize()
{
return nsDocument::Normalize();
}
NS_IMETHODIMP
nsHTMLDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
return nsDocument::Supports(aFeature, aVersion, aReturn);
}
//
// nsIDOMHTMLDocument interface implementation

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

@ -85,6 +85,42 @@ nsGenericXMLElement::CopyInnerTo(nsIContent* aSrcContent,
return NS_OK;
}
nsresult
nsGenericXMLElement::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericXMLElement::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericXMLElement::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericXMLElement::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericXMLElement::Supports(const nsString& aFeature,
const nsString& aVersion, PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult
nsGenericXMLElement::GetScriptObject(nsIScriptContext* aContext,
void** aScriptObject)

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

@ -39,6 +39,13 @@ public:
nsGenericXMLElement* aDest,
PRBool aDeep);
nsresult GetNamespaceURI(nsString& aNamespaceURI);
nsresult GetPrefix(nsString& aPrefix);
nsresult SetPrefix(const nsString& aPrefix);
nsresult GetLocalName(nsString& aLocalName);
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// Implementation for nsIDOMElement
nsresult GetAttribute(const nsString& aName, nsString& aReturn)
{
@ -83,8 +90,6 @@ public:
nsresult GetScriptObject(nsIScriptContext* aContext,
void** aScriptObject);
nsINameSpace* mNameSpace;
nsIAtom* mNameSpacePrefix;
PRInt32 mNameSpaceID;

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

@ -428,7 +428,6 @@ pref("security.policy.default.eventtarget.addeventlistener", "sameOrigin");
pref("security.policy.default.element.getattribute", "sameOrigin");
pref("security.policy.default.element.getattributenode", "sameOrigin");
pref("security.policy.default.element.getelementsbytagname", "sameOrigin");
pref("security.policy.default.element.normalize", "sameOrigin");
pref("security.policy.default.element.removeattribute", "sameOrigin");
pref("security.policy.default.element.removeattributenode", "sameOrigin");
pref("security.policy.default.element.setattribute", "sameOrigin");
@ -467,15 +466,20 @@ pref("security.policy.default.node.firstchild", "sameOrigin");
pref("security.policy.default.node.haschildnodes", "sameOrigin");
pref("security.policy.default.node.insertbefore", "sameOrigin");
pref("security.policy.default.node.lastchild", "sameOrigin");
pref("security.policy.default.node.localname", "sameOrigin");
pref("security.policy.default.node.namespaceuri", "sameOrigin");
pref("security.policy.default.node.nextsibling", "sameOrigin");
pref("security.policy.default.node.nodename", "sameOrigin");
pref("security.policy.default.node.nodetype", "sameOrigin");
pref("security.policy.default.node.nodevalue", "sameOrigin");
pref("security.policy.default.node.normalize", "sameOrigin");
pref("security.policy.default.node.ownerdocument", "sameOrigin");
pref("security.policy.default.node.parentnode", "sameOrigin");
pref("security.policy.default.node.prefix", "sameOrigin");
pref("security.policy.default.node.previoussibling", "sameOrigin");
pref("security.policy.default.node.removechild", "sameOrigin");
pref("security.policy.default.node.replacechild", "sameOrigin");
pref("security.policy.default.node.supports", "sameOrigin");
pref("security.policy.default.window.status", "sameOrigin");
pref("security.policy.default.window.scriptglobals", "sameOrigin");

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

@ -366,6 +366,34 @@ nsXULAttribute::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -404,6 +432,20 @@ nsXULAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::Normalize()
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULAttribute::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
// nsIDOMAttr interface

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

@ -3133,6 +3133,38 @@ nsXULDocument::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
NS_IMETHODIMP
nsXULDocument::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me");
return GetNodeName(aLocalName);
}
NS_IMETHODIMP
nsXULDocument::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -3174,6 +3206,23 @@ nsXULDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
}
NS_IMETHODIMP
nsXULDocument::Normalize()
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
//
// nsIJSScriptObject interface

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

@ -364,11 +364,17 @@ public:
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling);
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes);
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
NS_IMETHOD GetNamespaceURI(nsString& aNamespaceURI);
NS_IMETHOD GetPrefix(nsString& aPrefix);
NS_IMETHOD SetPrefix(const nsString& aPrefix);
NS_IMETHOD GetLocalName(nsString& aLocalName);
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn);
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn);
NS_IMETHOD AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn);
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn);
NS_IMETHOD Normalize();
NS_IMETHOD Supports(const nsString& aFeature, const nsString& aVersion, PRBool* aReturn);
// nsIJSScriptObject interface
virtual PRBool AddProperty(JSContext *aContext, JSObject *aObj,

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

@ -1083,6 +1083,38 @@ nsXULElement::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
}
NS_IMETHODIMP
nsXULElement::GetNamespaceURI(nsString& aNamespaceURI)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetPrefix(nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::SetPrefix(const nsString& aPrefix)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetLocalName(nsString& aLocalName)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, nsIDOMNode** aReturn)
{
@ -1361,6 +1393,23 @@ nsXULElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
}
NS_IMETHODIMP
nsXULElement::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
// nsIDOMElement interface
@ -1535,14 +1584,6 @@ nsXULElement::GetElementsByAttribute(const nsString& aAttribute,
}
NS_IMETHODIMP
nsXULElement::Normalize()
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
//----------------------------------------------------------------------
// nsIXMLContent interface