NS_IMETHOD'd some of the API's

This commit is contained in:
kipp 1998-05-30 01:36:47 +00:00
parent 0a09bfc52f
commit 3a6dc218b6
18 changed files with 267 additions and 256 deletions

View File

@ -163,41 +163,41 @@ public:
public:
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
// nsIDOMDocument interface
virtual nsresult GetNodeType(PRInt32 *aType);
virtual nsresult GetParentNode(nsIDOMNode **aNode);
virtual nsresult GetChildNodes(nsIDOMNodeIterator **aIterator);
virtual nsresult HasChildNodes();
virtual nsresult GetFirstChild(nsIDOMNode **aNode);
virtual nsresult GetPreviousSibling(nsIDOMNode **aNode);
virtual nsresult GetNextSibling(nsIDOMNode **aNode);
virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
virtual nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
virtual nsresult RemoveChild(nsIDOMNode *oldChild);
virtual nsresult GetMasterDoc(nsIDOMDocument **aDocument);
virtual nsresult SetMasterDoc(nsIDOMDocument *aDocument);
virtual nsresult GetDocumentType(nsIDOMNode **aDocType);
virtual nsresult SetDocumentType(nsIDOMNode *aNode);
virtual nsresult GetDocumentElement(nsIDOMElement **aElement);
virtual nsresult SetDocumentElement(nsIDOMElement *aElement);
virtual nsresult GetDocumentContext(nsIDOMDocumentContext **aDocContext);
virtual nsresult SetDocumentContext(nsIDOMDocumentContext *aContext);
virtual nsresult CreateDocumentContext(nsIDOMDocumentContext **aDocContext);
virtual nsresult CreateElement(nsString &aTagName,
NS_IMETHOD GetNodeType(PRInt32 *aType);
NS_IMETHOD GetParentNode(nsIDOMNode **aNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeIterator **aIterator);
NS_IMETHOD HasChildNodes();
NS_IMETHOD GetFirstChild(nsIDOMNode **aNode);
NS_IMETHOD GetPreviousSibling(nsIDOMNode **aNode);
NS_IMETHOD GetNextSibling(nsIDOMNode **aNode);
NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
NS_IMETHOD RemoveChild(nsIDOMNode *oldChild);
NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument);
NS_IMETHOD SetMasterDoc(nsIDOMDocument *aDocument);
NS_IMETHOD GetDocumentType(nsIDOMNode **aDocType);
NS_IMETHOD SetDocumentType(nsIDOMNode *aNode);
NS_IMETHOD GetDocumentElement(nsIDOMElement **aElement);
NS_IMETHOD SetDocumentElement(nsIDOMElement *aElement);
NS_IMETHOD GetDocumentContext(nsIDOMDocumentContext **aDocContext);
NS_IMETHOD SetDocumentContext(nsIDOMDocumentContext *aContext);
NS_IMETHOD CreateDocumentContext(nsIDOMDocumentContext **aDocContext);
NS_IMETHOD CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
virtual nsresult CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
virtual nsresult CreateComment(nsString &aData, nsIDOMComment **aComment);
virtual nsresult CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI);
virtual nsresult CreateAttribute(nsString &aName,
NS_IMETHOD CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
NS_IMETHOD CreateComment(nsString &aData, nsIDOMComment **aComment);
NS_IMETHOD CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI);
NS_IMETHOD CreateAttribute(nsString &aName,
nsIDOMNode *value,
nsIDOMAttribute **aAttribute);
virtual nsresult CreateAttributeList(nsIDOMAttributeList **aAttributesList);
virtual nsresult CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator);
virtual nsresult GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator);
NS_IMETHOD CreateAttributeList(nsIDOMAttributeList **aAttributesList);
NS_IMETHOD CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator);
NS_IMETHOD GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator);
protected:
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); // subclass hook

View File

@ -42,10 +42,10 @@ public:
return offsetof(nsHTMLDocument,mIHTMLDocument);
}
virtual nsresult CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
virtual nsresult CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
NS_IMETHOD CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
NS_IMETHOD CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
protected:
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet);

View File

@ -44,7 +44,7 @@ public:
* DocumentFragments, etc.) can only exist within the context of a Document
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateDocument(nsString &type, nsIDOMDocument** aDocument) = 0;
NS_IMETHOD CreateDocument(nsString &type, nsIDOMDocument** aDocument) = 0;
/**
* Returns TRUE if the current DOM implements a given feature, FALSE otherwise
@ -52,7 +52,7 @@ public:
* @param aFeature [in] The package name of the feature to test
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult HasFeature(nsString &aFeature) = 0;
NS_IMETHOD HasFeature(nsString &aFeature) = 0;
};

View File

@ -53,7 +53,7 @@ public:
* @param aName [out] The attribute name
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetName(nsString &aName) = 0;
NS_IMETHOD GetName(nsString &aName) = 0;
/**
* Return the value of this attribute.
@ -61,7 +61,7 @@ public:
* @param aName [out] The attribute value
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetValue(nsString &aName) = 0;
NS_IMETHOD GetValue(nsString &aName) = 0;
/**
* Set the value of this attribute.
@ -69,7 +69,7 @@ public:
* @param aName [in] The attribute value
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetValue(nsString &aName) = 0;
NS_IMETHOD SetValue(nsString &aName) = 0;
/**
* If this attribute was explicitly given a value in the original document,
@ -77,7 +77,7 @@ public:
*
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetSpecified() = 0;
NS_IMETHOD GetSpecified() = 0;
/**
* Set the specified value
@ -85,7 +85,7 @@ public:
* @param specified [in] The specified value
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetSpecified(PRBool specified) = 0;
NS_IMETHOD SetSpecified(PRBool specified) = 0;
/**
* Returns the attribute as a string. Character and general entity
@ -94,7 +94,7 @@ public:
* @param aString [out] The attribute as a string
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult ToString(nsString &aString) = 0;
NS_IMETHOD ToString(nsString &aString) = 0;
};
#define NS_IDOMATTRIBUTELIST_IID \
@ -118,7 +118,7 @@ public:
* @param aAttribute [out] The returned attribute
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetAttribute(nsString &aAttrName, nsIDOMAttribute** aAttribute) = 0;
NS_IMETHOD GetAttribute(nsString &aAttrName, nsIDOMAttribute** aAttribute) = 0;
/**
* Add a new attribute to the end of the list and associate it with the given name.
@ -130,7 +130,7 @@ public:
* @param aAttribute [in] The attribute to set
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetAttribute(nsIDOMAttribute *attr) = 0;
NS_IMETHOD SetAttribute(nsIDOMAttribute *attr) = 0;
/**
* Removes the Attribute instance named name from the list and returns it.
@ -139,7 +139,7 @@ public:
* @param aAttribute [out] The removed attribute
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Remove(nsString &attrName, nsIDOMAttribute** aAttribute) = 0;
NS_IMETHOD Remove(nsString &attrName, nsIDOMAttribute** aAttribute) = 0;
/**
* Returns the (zero-based) indexth Attribute item in the collection.
@ -148,7 +148,7 @@ public:
* @param aAttribute [out] The attribute at that index
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Item(PRUint32 aIndex, nsIDOMAttribute** aAttribute) = 0;
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMAttribute** aAttribute) = 0;
/**
* Returns the number of Attributes in the AttributeList instance.
@ -156,7 +156,7 @@ public:
* @param aLength [out] The attribute list length
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetLength(PRUint32 *aLength) = 0;
NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
};

View File

@ -30,8 +30,8 @@
class nsIDOMComment : public nsIDOMNode {
public:
//attribute UniString data;
virtual nsresult GetData(nsString &aData) = 0;
virtual nsresult SetData(nsString &aData) = 0;
NS_IMETHOD GetData(nsString &aData) = 0;
NS_IMETHOD SetData(nsString &aData) = 0;
};
#endif // nsIDOMComment_h__

View File

@ -52,7 +52,7 @@ public:
* @param aDocument [out] The root node of a Document Object Model
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetDocument(nsIDOMDocument **aDocument) = 0;
NS_IMETHOD GetDocument(nsIDOMDocument **aDocument) = 0;
/**
* Set the root node of a Document Object Model.
@ -60,7 +60,7 @@ public:
* @param aDocument [in] The root node of a Document Object Model
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetDocument(nsIDOMDocument *aDocument) = 0;
NS_IMETHOD SetDocument(nsIDOMDocument *aDocument) = 0;
};
#define NS_IDOMDOCUMENTFRAGMENT_IID \
@ -81,7 +81,7 @@ public:
* @param aDocument [out] The main Document
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetMasterDoc(nsIDOMDocument **aDocument) = 0;
NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument) = 0;
/**
* Set the Document object associated with this DocumentFragment
@ -89,7 +89,7 @@ public:
* @param aDocument [in] The main Document
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetMasterDoc(nsIDOMDocument *aDocument) = 0;
NS_IMETHOD SetMasterDoc(nsIDOMDocument *aDocument) = 0;
};
#define NS_IDOMDOCUMENT_IID \
@ -116,7 +116,7 @@ public:
* @param aDocType [out] The document type
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetDocumentType(nsIDOMNode **aDocType) = 0;
NS_IMETHOD GetDocumentType(nsIDOMNode **aDocType) = 0;
/**
* For XML, this sets the Document Type Definition (see DocumentType)
@ -126,7 +126,7 @@ public:
* @param aDocType [in] The document type
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetDocumentType(nsIDOMNode *aNode) = 0;
NS_IMETHOD SetDocumentType(nsIDOMNode *aNode) = 0;
/**
* This is a "convenience" function to jump directly to the child node
@ -135,7 +135,7 @@ public:
* @param aElement [out] The root element
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetDocumentElement(nsIDOMElement **aElement) = 0;
NS_IMETHOD GetDocumentElement(nsIDOMElement **aElement) = 0;
/**
* This is a "convenience" function to set the child node
@ -144,7 +144,7 @@ public:
* @param aElement [out] The root element
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetDocumentElement(nsIDOMElement *aElement) = 0;
NS_IMETHOD SetDocumentElement(nsIDOMElement *aElement) = 0;
/**
* Return the DocumentContext
@ -152,7 +152,7 @@ public:
* @param aContext [out] The DocumentContext
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetDocumentContext(nsIDOMDocumentContext **aDocContext) = 0;
NS_IMETHOD GetDocumentContext(nsIDOMDocumentContext **aDocContext) = 0;
/**
* Set the DocumentContext
@ -160,7 +160,7 @@ public:
* @param aContext [in] The DocumentContext
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetDocumentContext(nsIDOMDocumentContext *aContext) = 0;
NS_IMETHOD SetDocumentContext(nsIDOMDocumentContext *aContext) = 0;
/**
* Create and return a new DocumentContext.
@ -168,7 +168,7 @@ public:
* @param aDocContext [out] The new context
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateDocumentContext(nsIDOMDocumentContext **aDocContext) = 0;
NS_IMETHOD CreateDocumentContext(nsIDOMDocumentContext **aDocContext) = 0;
/**
* Create an element based on the tagName. Note that the instance returned may
@ -180,7 +180,7 @@ public:
* @param aElement [out] The new element
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateElement(nsString &aTagName,
NS_IMETHOD CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement) = 0;
@ -191,7 +191,7 @@ public:
* @param aTextNode [out] The new text node
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateTextNode(nsString &aData, nsIDOMText** aTextNode) = 0;
NS_IMETHOD CreateTextNode(nsString &aData, nsIDOMText** aTextNode) = 0;
/**
* Create a Comment node given the specified string
@ -200,7 +200,7 @@ public:
* @param aComment [out] The new Comment object.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateComment(nsString &aData, nsIDOMComment **aComment) = 0;
NS_IMETHOD CreateComment(nsString &aData, nsIDOMComment **aComment) = 0;
/**
* Create a PI node given the specified name and data strings.
@ -210,7 +210,7 @@ public:
* @param aPI [out] The new PI object
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI) = 0;
NS_IMETHOD CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI) = 0;
/**
* Create an Attribute of the given name and specified value. Note that the
@ -221,7 +221,7 @@ public:
* @param aAttribute [out] A new Attribute object.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateAttribute(nsString &aName,
NS_IMETHOD CreateAttribute(nsString &aName,
nsIDOMNode *value,
nsIDOMAttribute **aAttribute) = 0;
@ -231,7 +231,7 @@ public:
* @param aAttributesList [out] The new AttributeList
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateAttributeList(nsIDOMAttributeList **aAttributesList) = 0;
NS_IMETHOD CreateAttributeList(nsIDOMAttributeList **aAttributesList) = 0;
/**
* Create a TreeIterator anchored on a given node.
@ -240,7 +240,7 @@ public:
* @param aTreeIterator [out] A new TreeIterator object.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator) = 0;
NS_IMETHOD CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator) = 0;
/**
* Returns an iterator through all subordinate Elements with a given tag name.
@ -249,7 +249,7 @@ public:
* @param aIterator [out] A new NodeIterator object.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator) = 0;
NS_IMETHOD GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator) = 0;
};
#endif // nsIDOMDocument_h__

View File

@ -45,7 +45,7 @@ public:
* @param newChild [out] The tag name
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetTagName(nsString &aName) = 0;
NS_IMETHOD GetTagName(nsString &aName) = 0;
/**
* The attributes for this element.
@ -53,7 +53,7 @@ public:
* @param aAttributeList [out] The AttributeList
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetAttributes(nsIDOMAttributeList **aAttributeList) = 0;
NS_IMETHOD GetAttributes(nsIDOMAttributeList **aAttributeList) = 0;
/**
* Retrieves an attribute value by name from an Element object.
@ -64,7 +64,7 @@ public:
* @param aValue [out] The attribute value as a string
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetDOMAttribute(nsString &aName, nsString &aValue) = 0;
NS_IMETHOD GetDOMAttribute(nsString &aName, nsString &aValue) = 0;
/**
* Set an attribute value from an Element object.
@ -75,7 +75,7 @@ public:
* @param aValue [in] The attribute value as a string
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetDOMAttribute(nsString &aName, nsString &aValue) = 0;
NS_IMETHOD SetDOMAttribute(nsString &aName, nsString &aValue) = 0;
/**
* Remove the specified attribute
@ -83,7 +83,7 @@ public:
* @param aName [in] The attribute name
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult RemoveAttribute(nsString &aName) = 0;
NS_IMETHOD RemoveAttribute(nsString &aName) = 0;
/**
* Retrieves an Attribute node by name from an Element object.
@ -92,7 +92,7 @@ public:
* @param aAttribute [out] The attribute with the given name
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetAttributeNode(nsString &aName, nsIDOMAttribute **aAttribute) = 0;
NS_IMETHOD GetAttributeNode(nsString &aName, nsIDOMAttribute **aAttribute) = 0;
/**
* Set an Attribute node by name from an Element object.
@ -100,7 +100,7 @@ public:
* @param aAttribute [in] The attribute to set
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetAttributeNode(nsIDOMAttribute *aAttribute) = 0;
NS_IMETHOD SetAttributeNode(nsIDOMAttribute *aAttribute) = 0;
/**
* Removes the specified attribute/value pair from an Element node object.
@ -108,7 +108,7 @@ public:
* @param aAttribute [in] The attribute to remove
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult RemoveAttributeNode(nsIDOMAttribute *aAttribute) = 0;
NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute *aAttribute) = 0;
/**
* Returns an iterator through all subordinate elements with a given tag name.
@ -117,7 +117,7 @@ public:
* @param aIterator [out] The iterator
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetElementsByTagName(nsString &aName,nsIDOMNodeIterator **aIterator) = 0;
NS_IMETHOD GetElementsByTagName(nsString &aName,nsIDOMNodeIterator **aIterator) = 0;
/**
* Puts all Tet nodes in the sub-tree underneath this Element into a "normal"
@ -126,7 +126,7 @@ public:
*
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Normalize() = 0;
NS_IMETHOD Normalize() = 0;
};
#endif // nsIDOMElement_h__

View File

@ -46,7 +46,7 @@ public:
* to be filtered, otherwise, it will not be
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetFilter(PRInt32 aFilter, PRBool aFilterOn) = 0;
NS_IMETHOD SetFilter(PRInt32 aFilter, PRBool aFilterOn) = 0;
/**
* This method returns the number of items that will be iterated over if the
@ -58,7 +58,7 @@ public:
* results in multithreaded, multiuser situations.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetLength(PRUint32 *aLength) = 0;
NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
/**
* This method returns the Node over which the iterator currentl rests.
@ -66,7 +66,7 @@ public:
* @param aNode [out] This method will return the Node at the current position in the interation.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetCurrentNode(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetCurrentNode(nsIDOMNode **aNode) = 0;
/**
* This method alters the internal state of the iterator such that the node it
@ -77,7 +77,7 @@ public:
* or null when it is not possible to iterate any further.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetNextNode(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetNextNode(nsIDOMNode **aNode) = 0;
/**
* This method alters the internal state of the iterator such that the node it
@ -88,7 +88,7 @@ public:
* null when it is not possible to iterate any further.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetPreviousNode(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetPreviousNode(nsIDOMNode **aNode) = 0;
/**
* This method alters the internal state of the iterator such that the node it
@ -98,7 +98,7 @@ public:
* @param aNode [out] This method will only return null when there are no items to iterate over.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult ToFirst(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToFirst(nsIDOMNode **aNode) = 0;
/**
* This method alters the internal state of the iterator such that the node it
@ -108,7 +108,7 @@ public:
* @param aNode [out] This method will only return null when there are no items to iterate over.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult ToLast(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToLast(nsIDOMNode **aNode) = 0;
/**
* This method alters the internal state of the iterator such that the node it
@ -120,7 +120,7 @@ public:
* of the range of legal values.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult MoveTo(int aNth, nsIDOMNode **aNode) = 0;
NS_IMETHOD MoveTo(int aNth, nsIDOMNode **aNode) = 0;
};
#define NS_IDOMTREEITERATOR_IID \
@ -130,15 +130,15 @@ public:
class nsIDOMTreeIterator : public nsIDOMNodeIterator {
public:
virtual nsresult NumChildren(PRUint32 *aLength) = 0;
virtual nsresult NumPreviousSiblings(PRUint32 *aLength) = 0;
virtual nsresult NumNextSiblings(PRUint32 *aLength) = 0;
virtual nsresult ToParent(nsIDOMNode **aNode) = 0;
virtual nsresult ToPreviousSibling(nsIDOMNode **aNode) = 0;
virtual nsresult ToNextSibling(nsIDOMNode **aNode) = 0;
virtual nsresult ToFirstChild(nsIDOMNode **aNode) = 0;
virtual nsresult ToLastChild(nsIDOMNode **aNode) = 0;
virtual nsresult ToNthChild(nsIDOMNode **aNode) = 0;
NS_IMETHOD NumChildren(PRUint32 *aLength) = 0;
NS_IMETHOD NumPreviousSiblings(PRUint32 *aLength) = 0;
NS_IMETHOD NumNextSiblings(PRUint32 *aLength) = 0;
NS_IMETHOD ToParent(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToPreviousSibling(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToNextSibling(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToFirstChild(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToLastChild(nsIDOMNode **aNode) = 0;
NS_IMETHOD ToNthChild(nsIDOMNode **aNode) = 0;
};
#endif // nsIDOMIterators_h__

View File

@ -31,10 +31,10 @@ class nsIDOMNodeIterator;
{0xb7, 0x24, 0x00, 0x60, 0x08, 0x91, 0xd8, 0xc9} }
/**
* The Node object is the primary datatype for the entire Document Object Model.
* It represents a single node in the document tree. Nodes may have, but are
* not required to have, an arbitrary number of child nodes.
*/
* The Node object is the primary datatype for the entire Document
* Object Model. It represents a single node in the document
* tree. Nodes may have, but are not required to have, an arbitrary
* number of child nodes. */
class nsIDOMNode : public nsISupports {
public:
// NodeType
@ -53,65 +53,71 @@ public:
* @param aType [out] The type of the node.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetNodeType(PRInt32 *aType) = 0;
NS_IMETHOD GetNodeType(PRInt32 *aType) = 0;
/**
* Returns the parent of the given Node instance. If this node is the root of the
* document object tree, or if the node has not been added to a document tree,
* null is returned.
* Returns the parent of the given Node instance. If this node is
* the root of the document object tree, or if the node has not been
* added to a document tree, null is returned.
*
* @param aNode [out] The parent of the node.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetParentNode(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetParentNode(nsIDOMNode **aNode) = 0;
/**
* Returns a NodeIterator object that will enumerate all children of this node.
* If there are no children, an iterator that will return no nodes is returned.
* The content of the returned NodeIterator is "live" in the sense that changes to the
* children of the Node object that it was created from will be immediately reflected
* in the nodes returned by the iterator; it is not a static snapshot of the content
* of the Node. Similarly, changes made to the nodes returned by the iterator will
* be immediately reflected in the tree, including the set of children of the Node
* that the NodeIterator was created from.
* Returns a NodeIterator object that will enumerate all children
* of this node. If there are no children, an iterator that will
* return no nodes is returned. The content of the returned
* NodeIterator is "live" in the sense that changes to the children
* of the Node object that it was created from will be immediately
* reflected in the nodes returned by the iterator; it is not a
* static snapshot of the content of the Node. Similarly, changes
* made to the nodes returned by the iterator will be immediately
* reflected in the tree, including the set of children of the Node
* that the NodeIterator was created from.
*
* @param aIterator [out] An iterator through the children of the node.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetChildNodes(nsIDOMNodeIterator **aIterator) = 0;
NS_IMETHOD GetChildNodes(nsIDOMNodeIterator **aIterator) = 0;
/**
* Returns true if the node has any children, false if the node has no children at all.
* Returns true if the node has any children, false if the node has
* no children at all.
*
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult HasChildNodes() = 0;
NS_IMETHOD HasChildNodes() = 0;
/**
* Returns the first child of a node. If there is no such node, null is returned.
* Returns the first child of a node. If there is no such node,
* null is returned.
*
* @param aNode [out] The first child of the node, or null.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetFirstChild(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetFirstChild(nsIDOMNode **aNode) = 0;
/**
* Returns the node immediately preceding the current node in a breadth-first
* traversal of the tree. If there is no such node, null is returned.
* Returns the node immediately preceding the current node in a
* breadth-first traversal of the tree. If there is no such node,
* null is returned.
*
* @param aNode [out] The the node immediately preceeding, or null.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetPreviousSibling(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetPreviousSibling(nsIDOMNode **aNode) = 0;
/**
* Returns the node immediately following the current node in a breadth-first
* traversal of the tree. If there is no such node, null is returned.
* Returns the node immediately following the current node in a
* breadth-first traversal of the tree. If there is no such node,
* null is returned.
*
* @param aNode [out] The node immediately following, or null.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetNextSibling(nsIDOMNode **aNode) = 0;
NS_IMETHOD GetNextSibling(nsIDOMNode **aNode) = 0;
/**
* Inserts a child node (newChildbefore the existing child node refChild.
@ -121,25 +127,26 @@ public:
* @param refChild [in] The node before which the new node will be inserted
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild) = 0;
NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild) = 0;
/**
* Replaces the child node oldChild with newChild in the set of children of the
* given node, and return the oldChild node.
* Replaces the child node oldChild with newChild in the set of
* children of the given node, and return the oldChild node.
*
* @param newChild [in] The node to be inserted
* @param oldChild [in] The node to be replaced
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild) = 0;
NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild) = 0;
/**
* Removes the child node indicated by oldChild from the list of children and returns it.
* Removes the child node indicated by oldChild from the list of
* children and returns it.
*
* @param oldChild [in] The node to be deleted
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult RemoveChild(nsIDOMNode *oldChild) = 0;
NS_IMETHOD RemoveChild(nsIDOMNode *oldChild) = 0;
};
#endif // nsIDOMNode_h__

View File

@ -25,39 +25,39 @@
// forward declaration
class nsIDOMElement;
/* 8f6bca7b-ce42-11d1-b724-00600891d8c9 */
#define NS_IDOMTEXT_IID \
{ /* 8f6bca7b-ce42-11d1-b724-00600891d8c9 */ \
0x8f6bca7b, 0xce42, 0x11d1, \
{0xb7, 0x24, 0x00, 0x60, 0x08, 0x91, 0xd8, 0xc9} }
{ 0x8f6bca7b, 0xce42, 0x11d1, {0xb7, 0x24, 0x00, 0x60, 0x08, 0x91, 0xd8, 0xc9}}
/**
* The Text object contains the non-markup content of an Element. If there is no
* markup inside an Element's content, the text will be contained in a single
* Text object that is the child of the Element. Any markup will parse into
* child elements that are siblings of the Text nodes on either side of it, and
* whose content will be represented as Text node children of the markup element.
* The Text object contains the non-markup content of an Element. If
* there is no markup inside an Element's content, the text will be
* contained in a single Text object that is the child of the
* Element. Any markup will parse into child elements that are
* siblings of the Text nodes on either side of it, and whose content
* will be represented as Text node children of the markup element.
*/
class nsIDOMText : public nsIDOMNode {
public:
/**
* Return the actual content of the text node. Text nodes contain just plain text,
* without markup and without entities, both of which are represented as separate
* objects in the DOM.
* Return the actual content of the text node. Text nodes contain
* just plain text, without markup and without entities, both of
* which are represented as separate objects in the DOM.
*
* @param aString [out] The text data
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult GetData(nsString &aString) = 0;
NS_IMETHOD GetData(nsString& aString) = 0;
/**
* Set the actual content of the text node. Text nodes contain just plain text,
* without markup and without entities, both of which are represented as separate
* objects in the DOM.
* Set the actual content of the text node. Text nodes contain just
* plain text, without markup and without entities, both of which
* are represented as separate objects in the DOM.
*
* @param aString [in] The text data
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult SetData(nsString &aString) = 0;
NS_IMETHOD SetData(const nsString& aString) = 0;
/**
* Append the string to the end of the character data in this Text node
@ -65,7 +65,7 @@ public:
* @param aData [in] The data to append
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Append(nsString &aData) = 0;
NS_IMETHOD Append(const nsString& aData) = 0;
/**
* Insert the string at the specified character offset.
@ -74,7 +74,7 @@ public:
* @param aData [in] The data to insert
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Insert(int offset, nsString &aData) = 0;
NS_IMETHOD Insert(PRInt32 offset, const nsString& aData) = 0;
/**
* Delete the specified characters range
@ -83,7 +83,7 @@ public:
* @param count [out] The number of chracters to delete
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Delete(int offset, int count) = 0;
NS_IMETHOD Delete(PRInt32 offset, PRInt32 count) = 0;
/**
* Replace the characters starting at the specified character offset with
@ -94,22 +94,26 @@ public:
* @param aData [in] String to replace previous content with.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Replace(int offset, int count, nsString &aData) = 0;
NS_IMETHOD Replace(PRInt32 offset, PRInt32 count,
const nsString& aData) = 0;
/**
* Insert the specified element in the tree as a sibling of the Text node.
* The result of this operation may be the creation of up to 2 new Text nodes:
* the character data specified by the offset and count will form one Text node
* that will become the child of the inserted element and the remainder of
* the character data (after the offset and count) will form another Text node
* become a sibling of the original Text node.
* Insert the specified element in the tree as a sibling of the
* Text node. The result of this operation may be the creation of
* up to 2 new Text nodes: the character data specified by the
* offset and count will form one Text node that will become the
* child of the inserted element and the remainder of the character
* data (after the offset and count) will form another Text node
* become a sibling of the original Text node.
*
* @param element [in] Element to insert into the tree.
* @param offset [in] Offset at which to insert.
* @param count [in] Number of characters to copy to child Text node of element.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
* @param count [in] Number of characters to copy to child Text
* node of element.
* @return <b>NS_OK</b> iff the function succeeds, otherwise an error code
*/
virtual nsresult Splice(nsIDOMElement *element, int offset, int count) = 0;
NS_IMETHOD Splice(nsIDOMElement* element, PRInt32 offset,
PRInt32 count) = 0;
};
#endif // nsIDOMText_h__

View File

@ -54,14 +54,14 @@ public:
* @return nsresult NS_OK if the script object is successfully returned
*
**/
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject) = 0;
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject) = 0;
/**
* Nuke the current script object.
* Next call to GetScriptObject creates a new script object.
*
**/
virtual nsresult ResetScriptObject() = 0;
NS_IMETHOD ResetScriptObject() = 0;
};
class nsIDOMDocument;

View File

@ -163,41 +163,41 @@ public:
public:
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
// nsIDOMDocument interface
virtual nsresult GetNodeType(PRInt32 *aType);
virtual nsresult GetParentNode(nsIDOMNode **aNode);
virtual nsresult GetChildNodes(nsIDOMNodeIterator **aIterator);
virtual nsresult HasChildNodes();
virtual nsresult GetFirstChild(nsIDOMNode **aNode);
virtual nsresult GetPreviousSibling(nsIDOMNode **aNode);
virtual nsresult GetNextSibling(nsIDOMNode **aNode);
virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
virtual nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
virtual nsresult RemoveChild(nsIDOMNode *oldChild);
virtual nsresult GetMasterDoc(nsIDOMDocument **aDocument);
virtual nsresult SetMasterDoc(nsIDOMDocument *aDocument);
virtual nsresult GetDocumentType(nsIDOMNode **aDocType);
virtual nsresult SetDocumentType(nsIDOMNode *aNode);
virtual nsresult GetDocumentElement(nsIDOMElement **aElement);
virtual nsresult SetDocumentElement(nsIDOMElement *aElement);
virtual nsresult GetDocumentContext(nsIDOMDocumentContext **aDocContext);
virtual nsresult SetDocumentContext(nsIDOMDocumentContext *aContext);
virtual nsresult CreateDocumentContext(nsIDOMDocumentContext **aDocContext);
virtual nsresult CreateElement(nsString &aTagName,
NS_IMETHOD GetNodeType(PRInt32 *aType);
NS_IMETHOD GetParentNode(nsIDOMNode **aNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeIterator **aIterator);
NS_IMETHOD HasChildNodes();
NS_IMETHOD GetFirstChild(nsIDOMNode **aNode);
NS_IMETHOD GetPreviousSibling(nsIDOMNode **aNode);
NS_IMETHOD GetNextSibling(nsIDOMNode **aNode);
NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
NS_IMETHOD RemoveChild(nsIDOMNode *oldChild);
NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument);
NS_IMETHOD SetMasterDoc(nsIDOMDocument *aDocument);
NS_IMETHOD GetDocumentType(nsIDOMNode **aDocType);
NS_IMETHOD SetDocumentType(nsIDOMNode *aNode);
NS_IMETHOD GetDocumentElement(nsIDOMElement **aElement);
NS_IMETHOD SetDocumentElement(nsIDOMElement *aElement);
NS_IMETHOD GetDocumentContext(nsIDOMDocumentContext **aDocContext);
NS_IMETHOD SetDocumentContext(nsIDOMDocumentContext *aContext);
NS_IMETHOD CreateDocumentContext(nsIDOMDocumentContext **aDocContext);
NS_IMETHOD CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
virtual nsresult CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
virtual nsresult CreateComment(nsString &aData, nsIDOMComment **aComment);
virtual nsresult CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI);
virtual nsresult CreateAttribute(nsString &aName,
NS_IMETHOD CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
NS_IMETHOD CreateComment(nsString &aData, nsIDOMComment **aComment);
NS_IMETHOD CreatePI(nsString &aName, nsString &aData, nsIDOMPI **aPI);
NS_IMETHOD CreateAttribute(nsString &aName,
nsIDOMNode *value,
nsIDOMAttribute **aAttribute);
virtual nsresult CreateAttributeList(nsIDOMAttributeList **aAttributesList);
virtual nsresult CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator);
virtual nsresult GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator);
NS_IMETHOD CreateAttributeList(nsIDOMAttributeList **aAttributesList);
NS_IMETHOD CreateTreeIterator(nsIDOMNode **aNode, nsIDOMTreeIterator **aTreeIterator);
NS_IMETHOD GetElementsByTagName(nsString &aTagname, nsIDOMNodeIterator **aIterator);
protected:
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); // subclass hook

View File

@ -32,16 +32,16 @@ public:
NS_DECL_ISUPPORTS
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
// nsIDOMAttribute interface
virtual nsresult GetName(nsString &aName);
virtual nsresult GetValue(nsString &aValue);
virtual nsresult SetValue(nsString &aValue);
virtual nsresult GetSpecified();
virtual nsresult SetSpecified(PRBool specified);
virtual nsresult ToString(nsString &aString);
NS_IMETHOD GetName(nsString &aName);
NS_IMETHOD GetValue(nsString &aValue);
NS_IMETHOD SetValue(nsString &aValue);
NS_IMETHOD GetSpecified();
NS_IMETHOD SetSpecified(PRBool specified);
NS_IMETHOD ToString(nsString &aString);
private:
nsString *mName;
@ -57,15 +57,15 @@ public:
NS_DECL_ISUPPORTS
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
// nsIDOMAttributeList interface
virtual nsresult GetAttribute(nsString &aAttrName, nsIDOMAttribute** aAttribute);
virtual nsresult SetAttribute(nsIDOMAttribute *aAttribute);
virtual nsresult Remove(nsString &attrName, nsIDOMAttribute** aAttribute);
virtual nsresult Item(PRUint32 aIndex, nsIDOMAttribute** aAttribute);
virtual nsresult GetLength(PRUint32 *aLength);
NS_IMETHOD GetAttribute(nsString &aAttrName, nsIDOMAttribute** aAttribute);
NS_IMETHOD SetAttribute(nsIDOMAttribute *aAttribute);
NS_IMETHOD Remove(nsString &attrName, nsIDOMAttribute** aAttribute);
NS_IMETHOD Item(PRUint32 aIndex, nsIDOMAttribute** aAttribute);
NS_IMETHOD GetLength(PRUint32 *aLength);
private:
nsIHTMLContent &mContent;

View File

@ -30,18 +30,18 @@ public:
NS_DECL_ISUPPORTS
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
// nsIDOMIterator interface
virtual nsresult SetFilter(PRInt32 aFilter, PRBool aFilterOn);
virtual nsresult GetLength(PRUint32 *aLength);
virtual nsresult GetCurrentNode(nsIDOMNode **aNode);
virtual nsresult GetNextNode(nsIDOMNode **aNode);
virtual nsresult GetPreviousNode(nsIDOMNode **aNode);
virtual nsresult ToFirst(nsIDOMNode **aNode);
virtual nsresult ToLast(nsIDOMNode **aNode);
virtual nsresult MoveTo(int aNth, nsIDOMNode **aNode);
NS_IMETHOD SetFilter(PRInt32 aFilter, PRBool aFilterOn);
NS_IMETHOD GetLength(PRUint32 *aLength);
NS_IMETHOD GetCurrentNode(nsIDOMNode **aNode);
NS_IMETHOD GetNextNode(nsIDOMNode **aNode);
NS_IMETHOD GetPreviousNode(nsIDOMNode **aNode);
NS_IMETHOD ToFirst(nsIDOMNode **aNode);
NS_IMETHOD ToLast(nsIDOMNode **aNode);
NS_IMETHOD MoveTo(int aNth, nsIDOMNode **aNode);
private:
nsIContent &mContent;

View File

@ -47,13 +47,13 @@ public:
virtual void MapAttributesInto(nsIStyleContext* aContext,
nsIPresContext* aPresContext);
virtual nsresult GetChildNodes(nsIDOMNodeIterator **aIterator);
virtual nsresult HasChildNodes();
virtual nsresult GetFirstChild(nsIDOMNode **aNode);
virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
virtual nsresult ReplaceChild(nsIDOMNode *newChild,
NS_IMETHOD GetChildNodes(nsIDOMNodeIterator **aIterator);
NS_IMETHOD HasChildNodes();
NS_IMETHOD GetFirstChild(nsIDOMNode **aNode);
NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
NS_IMETHOD ReplaceChild(nsIDOMNode *newChild,
nsIDOMNode *oldChild);
virtual nsresult RemoveChild(nsIDOMNode *oldChild);
NS_IMETHOD RemoveChild(nsIDOMNode *oldChild);
protected:
nsHTMLContainer();

View File

@ -86,32 +86,32 @@ public:
virtual nsIStyleRule* GetStyleRule(void);
// nsIScriptObjectOwner interface
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
// nsIDOMElement interface
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
virtual nsresult GetNodeType(PRInt32 *aType);
virtual nsresult GetParentNode(nsIDOMNode **aNode);
virtual nsresult GetChildNodes(nsIDOMNodeIterator **aIterator);
virtual nsresult HasChildNodes();
virtual nsresult GetFirstChild(nsIDOMNode **aNode);
virtual nsresult GetPreviousSibling(nsIDOMNode **aNode);
virtual nsresult GetNextSibling(nsIDOMNode **aNode);
virtual nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
virtual nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
virtual nsresult RemoveChild(nsIDOMNode *oldChild);
virtual nsresult GetTagName(nsString &aName);
virtual nsresult GetAttributes(nsIDOMAttributeList **aAttributeList);
virtual nsresult GetDOMAttribute(nsString &aName, nsString &aValue);
virtual nsresult SetDOMAttribute(nsString &aName, nsString &aValue);
virtual nsresult RemoveAttribute(nsString &aName);
virtual nsresult GetAttributeNode(nsString &aName, nsIDOMAttribute **aAttribute);
virtual nsresult SetAttributeNode(nsIDOMAttribute *aAttribute);
virtual nsresult RemoveAttributeNode(nsIDOMAttribute *aAttribute);
virtual nsresult GetElementsByTagName(nsString &aName,nsIDOMNodeIterator **aIterator);
virtual nsresult Normalize();
NS_IMETHOD GetNodeType(PRInt32 *aType);
NS_IMETHOD GetParentNode(nsIDOMNode **aNode);
NS_IMETHOD GetChildNodes(nsIDOMNodeIterator **aIterator);
NS_IMETHOD HasChildNodes();
NS_IMETHOD GetFirstChild(nsIDOMNode **aNode);
NS_IMETHOD GetPreviousSibling(nsIDOMNode **aNode);
NS_IMETHOD GetNextSibling(nsIDOMNode **aNode);
NS_IMETHOD InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild);
NS_IMETHOD ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild);
NS_IMETHOD RemoveChild(nsIDOMNode *oldChild);
NS_IMETHOD GetTagName(nsString &aName);
NS_IMETHOD GetAttributes(nsIDOMAttributeList **aAttributeList);
NS_IMETHOD GetDOMAttribute(nsString &aName, nsString &aValue);
NS_IMETHOD SetDOMAttribute(nsString &aName, nsString &aValue);
NS_IMETHOD RemoveAttribute(nsString &aName);
NS_IMETHOD GetAttributeNode(nsString &aName, nsIDOMAttribute **aAttribute);
NS_IMETHOD SetAttributeNode(nsIDOMAttribute *aAttribute);
NS_IMETHOD RemoveAttributeNode(nsIDOMAttribute *aAttribute);
NS_IMETHOD GetElementsByTagName(nsString &aName,nsIDOMNodeIterator **aIterator);
NS_IMETHOD Normalize();
// Utility routines for making attribute parsing easier

View File

@ -42,10 +42,10 @@ public:
return offsetof(nsHTMLDocument,mIHTMLDocument);
}
virtual nsresult CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
virtual nsresult CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
NS_IMETHOD CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement);
NS_IMETHOD CreateTextNode(nsString &aData, nsIDOMText** aTextNode);
protected:
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet);

View File

@ -95,8 +95,8 @@ public:
virtual nsresult GetScriptContext(nsIScriptContext **aContext);
virtual nsresult ReleaseScriptContext();
virtual nsresult GetScriptObject(JSContext *aContext, void** aScriptObject);
virtual nsresult ResetScriptObject();
NS_IMETHOD GetScriptObject(JSContext *aContext, void** aScriptObject);
NS_IMETHOD ResetScriptObject();
private:
nsresult ProvideDefaultHandlers();