gecko-dev/content/base/src/nsGenericDOMDataNode.h

423 lines
18 KiB
C
Raw Normal View History

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
1998-09-06 00:16:36 +00:00
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
1998-09-06 00:16:36 +00:00
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
1998-09-06 00:16:36 +00:00
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Base class for DOM Core's nsIDOMComment, nsIDOMDocumentType, nsIDOMText,
* nsIDOMCDATASection, and nsIDOMProcessingInstruction nodes.
*/
1998-09-06 04:16:22 +00:00
#ifndef nsGenericDOMDataNode_h___
#define nsGenericDOMDataNode_h___
1998-09-06 00:16:36 +00:00
#include "nsIDOMCharacterData.h"
#include "nsIDOMEventTarget.h"
#include "nsTextFragment.h"
1998-09-06 00:16:36 +00:00
#include "nsVoidArray.h"
#include "nsDOMError.h"
Landing changes Vidur made while the tree was closed for beta1 work, here's a list of the changes. r=me [1] Cutting down the size of content. Made nsIJSScriptObject inherit from nsIScriptObjectOwner [2] Cutting down the size of content. Made nsITextContent inherit from nsIContent. [3] Cutting down the size of content. Moved implementation of nsIDOMReceiver to nsListenerManager. This is not true aggregation since it isn't transitive, but it's OK for now. It will be necessary for nsListenerManager to have a reference to its content in the future anyway, so the transitivity could be done. dom/public/nsDOMPropEnums.h,v - bug 12559 dom/public/nsIJSScriptObject.h,v - [1] dom/public/html/MANIFEST,v - bug 12559 dom/public/html/Makefile.in,v - bug 12559 dom/public/html/makefile.win,v - bug 12559 dom/public/html/nsIDOMHTMLInputElement.h,v - bug 17544 dom/public/idl/html/HTMLAnchorElement.idl,v - bug 12559 dom/public/idl/html/HTMLAreaElement.idl,v - bug 12559 dom/public/idl/html/HTMLInputElement.idl,v - bug 17544 dom/src/base/nsGlobalWindow.cpp,v - bug 30700 dom/src/base/nsGlobalWindow.h,v - [1] dom/src/base/nsLocation.cpp,v - [1] dom/src/html/nsJSHTMLAnchorElement.cpp,v - bug 12559 dom/src/html/nsJSHTMLAreaElement.cpp,v - bug 12559 dom/src/html/nsJSHTMLInputElement.cpp,v - bug 17544 layout/base/public/nsIDocument.h,v - bug 27953 layout/base/public/nsITextContent.h,v - [2] layout/base/src/nsCommentNode.cpp,v - [2] layout/base/src/nsDocument.cpp,v - bug 27953 layout/base/src/nsDocument.h,v - bug 27953 layout/base/src/nsDocumentViewer.cpp,v - bug 27953 layout/base/src/nsGenericDOMDataNode.cpp,v - [3] layout/base/src/nsGenericDOMDataNode.h,v - [3] layout/base/src/nsGenericElement.cpp,v - [3] layout/base/src/nsGenericElement.h,v - [3] layout/base/src/nsNameSpaceManager.cpp,v - bug 7834 layout/base/src/nsStyleContext.cpp,v - outline property shouldn't reflow layout/base/src/nsTextNode.cpp,v - [2] layout/events/src/nsEventListenerManager.cpp,v - [3] layout/events/src/nsEventListenerManager.h,v - [3] layout/html/base/src/nsGfxScrollFrame.cpp,v - nsString->nsAutoString layout/html/content/src/nsAttributeContent.cpp,v - [2] layout/html/content/src/nsHTMLAnchorElement.cpp,v - [1][3] layout/html/content/src/nsHTMLAppletElement.cpp,v - [1][3] layout/html/content/src/nsHTMLAreaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBRElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBaseElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBaseFontElement.cpp,v - [1][3] layout/html/content/src/nsHTMLBodyElement.cpp,v - [1][3] layout/html/content/src/nsHTMLButtonElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDelElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDirectoryElement.cpp,v - [1][3] layout/html/content/src/nsHTMLDivElement.cpp,v - [1][3] layout/html/content/src/nsHTMLEmbedElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFieldSetElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFontElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFormElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFrameElement.cpp,v - [1][3] layout/html/content/src/nsHTMLFrameSetElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHRElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHeadElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHeadingElement.cpp,v - [1][3] layout/html/content/src/nsHTMLHtmlElement.cpp,v - [1][3] layout/html/content/src/nsHTMLIFrameElement.cpp,v - [1][3] layout/html/content/src/nsHTMLImageElement.cpp,v - [1][3] layout/html/content/src/nsHTMLInputElement.cpp,v - [1][3] layout/html/content/src/nsHTMLInsElement.cpp,v - [1][3] layout/html/content/src/nsHTMLIsIndexElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLIElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLabelElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLayerElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLegendElement.cpp,v - [1][3] layout/html/content/src/nsHTMLLinkElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMapElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMenuElement.cpp,v - [1][3] layout/html/content/src/nsHTMLMetaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLModElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLObjectElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOptGroupElement.cpp,v - [1][3] layout/html/content/src/nsHTMLOptionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLParagraphElement.cpp,v - [1][3] layout/html/content/src/nsHTMLParamElement.cpp,v - [1][3] layout/html/content/src/nsHTMLPreElement.cpp,v - [1][3] layout/html/content/src/nsHTMLQuoteElement.cpp,v - [1][3] layout/html/content/src/nsHTMLScriptElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSelectElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSpacerElement.cpp,v - [1][3] layout/html/content/src/nsHTMLSpanElement.cpp,v - [1][3] layout/html/content/src/nsHTMLStyleElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableCaptionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableCellElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableColElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableColGroupElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableRowElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTableSectionElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTextAreaElement.cpp,v - [1][3] layout/html/content/src/nsHTMLTitleElement.cpp,v - [1][3] layout/html/content/src/nsHTMLUListElement.cpp,v - [1][3] layout/html/content/src/nsHTMLWBRElement.cpp,v - [1][3] layout/html/document/src/nsHTMLDocument.cpp,v - bug 27953 layout/html/document/src/nsHTMLDocument.h,v - bug 27953 layout/xml/content/src/nsXMLCDATASection.cpp,v - [1][2] layout/xml/content/src/nsXMLDocumentType.cpp,v - [1][2] layout/xml/content/src/nsXMLElement.h,v - [1][2] layout/xml/content/src/nsXMLEntity.cpp,v - [1][2] layout/xml/content/src/nsXMLNotation.cpp,v - [1][2] layout/xml/content/src/nsXMLProcessingInstruction.cpp,v - [1][2] layout/xul/base/src/nsBoxFrame.cpp,v - nsString->nsAutoString layout/xul/base/src/nsSliderFrame.cpp,v - nsString->nsAutoString netwerk/protocol/http/src/nsHTTPRequest.cpp,v - nsString->nsAutoString rdf/content/src/nsXULDocument.cpp,v - bug 27953 rdf/content/src/nsXULDocument.h,v - bug 27953 rdf/content/src/nsXULElement.h,v - [1] xpcom/base/IIDS.h,v - bug 12559
2000-03-17 13:27:00 +00:00
#include "nsIEventListenerManager.h"
#include "nsGenericElement.h"
#include "nsCycleCollectionParticipant.h"
1998-09-06 00:16:36 +00:00
class nsIDOMAttr;
1998-09-06 00:16:36 +00:00
class nsIDOMEventListener;
class nsIDOMNodeList;
class nsIFrame;
class nsIDOMText;
2000-05-12 14:09:28 +00:00
class nsINodeInfo;
class nsURI;
1998-09-06 00:16:36 +00:00
class nsGenericDOMDataNode : public nsIContent
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
nsGenericDOMDataNode(nsINodeInfo *aNodeInfo);
1999-05-13 02:11:25 +00:00
virtual ~nsGenericDOMDataNode();
1998-09-06 00:16:36 +00:00
// Implementation for nsIDOMNode
nsresult GetNodeValue(nsAString& aNodeValue);
nsresult SetNodeValue(const nsAString& aNodeValue);
nsresult GetParentNode(nsIDOMNode** aParentNode);
nsresult GetAttributes(nsIDOMNamedNodeMap** aAttributes)
{
NS_ENSURE_ARG_POINTER(aAttributes);
1998-09-06 00:16:36 +00:00
*aAttributes = nsnull;
return NS_OK;
}
nsresult GetPreviousSibling(nsIDOMNode** aPreviousSibling);
nsresult GetNextSibling(nsIDOMNode** aNextSibling);
nsresult GetChildNodes(nsIDOMNodeList** aChildNodes);
nsresult HasChildNodes(PRBool* aHasChildNodes)
{
NS_ENSURE_ARG_POINTER(aHasChildNodes);
1998-09-06 00:16:36 +00:00
*aHasChildNodes = PR_FALSE;
return NS_OK;
}
nsresult HasAttributes(PRBool* aHasAttributes)
{
NS_ENSURE_ARG_POINTER(aHasAttributes);
*aHasAttributes = PR_FALSE;
return NS_OK;
}
nsresult GetFirstChild(nsIDOMNode** aFirstChild)
{
NS_ENSURE_ARG_POINTER(aFirstChild);
1998-09-06 00:16:36 +00:00
*aFirstChild = nsnull;
return NS_OK;
}
nsresult GetLastChild(nsIDOMNode** aLastChild)
{
NS_ENSURE_ARG_POINTER(aLastChild);
1998-09-06 00:16:36 +00:00
*aLastChild = nsnull;
return NS_OK;
}
nsresult InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
1998-09-06 00:16:36 +00:00
}
nsresult ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild,
nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
/*
* Data nodes can't have children.
*/
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
1998-09-06 00:16:36 +00:00
}
nsresult RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
/*
* Data nodes can't have children, i.e. aOldChild can't be a child of
* this node.
*/
return NS_ERROR_DOM_NOT_FOUND_ERR;
1998-09-06 00:16:36 +00:00
}
nsresult AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
{
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
1998-09-06 00:16:36 +00:00
}
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
nsresult GetNamespaceURI(nsAString& aNamespaceURI);
nsresult GetLocalName(nsAString& aLocalName);
nsresult GetPrefix(nsAString& aPrefix);
nsresult SetPrefix(const nsAString& aPrefix);
nsresult Normalize();
nsresult IsSupported(const nsAString& aFeature,
const nsAString& aVersion,
PRBool* aReturn);
nsresult GetBaseURI(nsAString& aURI);
nsresult LookupPrefix(const nsAString& aNamespaceURI,
nsAString& aPrefix);
nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix,
nsAString& aNamespaceURI);
1998-09-06 00:16:36 +00:00
// Implementation for nsIDOMCharacterData
nsresult GetData(nsAString& aData) const;
nsresult SetData(const nsAString& aData);
nsresult GetLength(PRUint32* aLength);
nsresult SubstringData(PRUint32 aOffset, PRUint32 aCount,
nsAString& aReturn);
nsresult AppendData(const nsAString& aArg);
nsresult InsertData(PRUint32 aOffset, const nsAString& aArg);
nsresult DeleteData(PRUint32 aOffset, PRUint32 aCount);
nsresult ReplaceData(PRUint32 aOffset, PRUint32 aCount,
const nsAString& aArg);
// nsINode methods
virtual PRUint32 GetChildCount() const;
virtual nsIContent *GetChildAt(PRUint32 aIndex) const;
virtual PRInt32 IndexOf(nsINode* aPossibleChild) const;
virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex,
PRBool aNotify);
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify);
virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor);
virtual nsresult DispatchDOMEvent(nsEvent* aEvent, nsIDOMEvent* aDOMEvent,
nsPresContext* aPresContext,
nsEventStatus* aEventStatus);
virtual nsresult GetListenerManager(PRBool aCreateIfNotFound,
nsIEventListenerManager** aResult);
virtual nsresult AddEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
virtual nsresult RemoveEventListenerByIID(nsIDOMEventListener *aListener,
const nsIID& aIID);
virtual nsresult GetSystemEventGroup(nsIDOMEventGroup** aGroup);
1998-09-06 00:16:36 +00:00
// Implementation for nsIContent
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
PRBool aCompileEventHandlers);
virtual void UnbindFromTree(PRBool aDeep = PR_TRUE,
PRBool aNullParent = PR_TRUE);
virtual nsIAtom *GetIDAttributeName() const;
virtual already_AddRefed<nsINodeInfo> GetExistingAttrNameFromQName(const nsAString& aStr) const;
nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, PRBool aNotify)
{
return SetAttr(aNameSpaceID, aName, nsnull, aValue, aNotify);
}
virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
nsIAtom* aPrefix, const nsAString& aValue,
PRBool aNotify);
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
virtual PRBool GetAttr(PRInt32 aNameSpaceID, nsIAtom *aAttribute,
nsAString& aResult) const;
virtual PRBool HasAttr(PRInt32 aNameSpaceID, nsIAtom *aAttribute) const;
virtual const nsAttrName* GetAttrNameAt(PRUint32 aIndex) const;
virtual PRUint32 GetAttrCount() const;
virtual const nsTextFragment *GetText();
virtual PRUint32 TextLength();
virtual nsresult SetText(const PRUnichar* aBuffer, PRUint32 aLength,
PRBool aNotify);
// Need to implement this here too to avoid hiding.
nsresult SetText(const nsAString& aStr, PRBool aNotify)
{
return SetText(aStr.BeginReading(), aStr.Length(), aNotify);
}
virtual nsresult AppendText(const PRUnichar* aBuffer, PRUint32 aLength,
PRBool aNotify);
virtual PRBool TextIsOnlyWhitespace();
virtual void AppendTextTo(nsAString& aResult);
#ifdef DEBUG
virtual void List(FILE* out, PRInt32 aIndent) const;
virtual void DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
#endif
virtual nsIContent *GetBindingParent() const;
virtual PRBool IsNodeOfType(PRUint32 aFlags) const;
virtual already_AddRefed<nsIURI> GetBaseURI() const;
virtual PRBool IsLink(nsIURI** aURI) const;
virtual PRBool MayHaveFrame() const;
virtual nsIAtom* GetID() const;
virtual const nsAttrValue* GetClasses() const;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
virtual nsICSSStyleRule* GetInlineStyleRule();
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsChangeHint GetAttributeChangeHint(const nsIAtom* aAttribute,
PRInt32 aModType) const;
virtual nsIAtom *GetClassAttributeName() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
{
*aResult = CloneDataNode(aNodeInfo, PR_TRUE);
if (!*aResult) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(*aResult);
return NS_OK;
}
1998-09-06 00:16:36 +00:00
//----------------------------------------
#ifdef DEBUG
void ToCString(nsAString& aBuf, PRInt32 aOffset, PRInt32 aLen) const;
#endif
NS_DECL_CYCLE_COLLECTION_CLASS(nsGenericDOMDataNode)
protected:
/**
* There are a set of DOM- and scripting-specific instance variables
* that may only be instantiated when a content object is accessed
* through the DOM. Rather than burn actual slots in the content
* objects for each of these instance variables, we put them off
* in a side structure that's only allocated when the content is
* accessed through the DOM.
*/
class nsDataSlots : public nsINode::nsSlots
{
public:
nsDataSlots(PtrBits aFlags)
: nsINode::nsSlots(aFlags),
mBindingParent(nsnull)
{
}
/**
* The nearest enclosing content node with a binding that created us.
* @see nsIContent::GetBindingParent
*/
nsIContent* mBindingParent; // [Weak]
};
// Override from nsINode
virtual nsINode::nsSlots* CreateSlots();
nsDataSlots *GetDataSlots()
{
return NS_STATIC_CAST(nsDataSlots*, GetSlots());
}
nsDataSlots *GetExistingDataSlots() const
{
return NS_STATIC_CAST(nsDataSlots*, GetExistingSlots());
}
nsresult SplitText(PRUint32 aOffset, nsIDOMText** aReturn);
nsresult SetTextInternal(PRUint32 aOffset, PRUint32 aCount,
const PRUnichar* aBuffer, PRUint32 aLength,
PRBool aNotify);
/**
* Method to clone this node. This needs to be overriden by all derived
* classes. If aCloneText is true the text content will be cloned too.
*
* @param aOwnerDocument the ownerDocument of the clone
* @param aCloneText if true the text content will be cloned too
* @return the clone
*/
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo,
PRBool aCloneText) const = 0;
nsTextFragment mText;
private:
void SetBidiStatus();
1998-09-06 00:16:36 +00:00
already_AddRefed<nsIAtom> GetCurrentValueAtom();
1998-09-06 00:16:36 +00:00
};
//----------------------------------------------------------------------
/**
* Mostly implement the nsIDOMNode API by forwarding the methods to
* nsGenericDOMDataNode
1998-09-06 00:16:36 +00:00
*
* Note that classes using this macro will need to implement:
* NS_IMETHOD GetNodeType(PRUint16* aNodeType);
* nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo,
* PRBool aCloneText) const;
1998-09-06 00:16:36 +00:00
*/
#define NS_IMPL_NSIDOMNODE_USING_GENERIC_DOM_DATA \
NS_IMETHOD GetNodeName(nsAString& aNodeName); \
NS_IMETHOD GetLocalName(nsAString& aLocalName) { \
return nsGenericDOMDataNode::GetLocalName(aLocalName); \
1998-09-06 00:16:36 +00:00
} \
NS_IMETHOD GetNodeValue(nsAString& aNodeValue); \
NS_IMETHOD SetNodeValue(const nsAString& aNodeValue); \
NS_IMETHOD GetNodeType(PRUint16* aNodeType); \
NS_IMETHOD GetParentNode(nsIDOMNode** aParentNode) { \
return nsGenericDOMDataNode::GetParentNode(aParentNode); \
1998-09-06 00:16:36 +00:00
} \
NS_IMETHOD GetChildNodes(nsIDOMNodeList** aChildNodes) { \
return nsGenericDOMDataNode::GetChildNodes(aChildNodes); \
1998-09-06 00:16:36 +00:00
} \
NS_IMETHOD HasChildNodes(PRBool* aHasChildNodes) { \
return nsGenericDOMDataNode::HasChildNodes(aHasChildNodes); \
1998-09-06 00:16:36 +00:00
} \
NS_IMETHOD HasAttributes(PRBool* aHasAttributes) { \
return nsGenericDOMDataNode::HasAttributes(aHasAttributes); \
1998-09-06 00:16:36 +00:00
} \
NS_IMETHOD GetFirstChild(nsIDOMNode** aFirstChild) { \
return nsGenericDOMDataNode::GetFirstChild(aFirstChild); \
} \
NS_IMETHOD GetLastChild(nsIDOMNode** aLastChild) { \
return nsGenericDOMDataNode::GetLastChild(aLastChild); \
} \
NS_IMETHOD GetPreviousSibling(nsIDOMNode** aPreviousSibling) { \
return nsGenericDOMDataNode::GetPreviousSibling(aPreviousSibling); \
} \
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) { \
return nsGenericDOMDataNode::GetNextSibling(aNextSibling); \
} \
NS_IMETHOD GetAttributes(nsIDOMNamedNodeMap** aAttributes) { \
return nsGenericDOMDataNode::GetAttributes(aAttributes); \
} \
NS_IMETHOD InsertBefore(nsIDOMNode* aNewChild, nsIDOMNode* aRefChild, \
nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::InsertBefore(aNewChild, aRefChild, \
aReturn); \
} \
NS_IMETHOD AppendChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::AppendChild(aOldChild, aReturn); \
} \
NS_IMETHOD ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, \
nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::ReplaceChild(aNewChild, aOldChild, \
aReturn); \
} \
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { \
return nsGenericDOMDataNode::RemoveChild(aOldChild, aReturn); \
} \
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) { \
return nsGenericDOMDataNode::GetOwnerDocument(aOwnerDocument); \
} \
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) { \
return nsGenericDOMDataNode::GetNamespaceURI(aNamespaceURI); \
} \
NS_IMETHOD GetPrefix(nsAString& aPrefix) { \
return nsGenericDOMDataNode::GetPrefix(aPrefix); \
} \
NS_IMETHOD SetPrefix(const nsAString& aPrefix) { \
return nsGenericDOMDataNode::SetPrefix(aPrefix); \
} \
NS_IMETHOD Normalize() { \
return NS_OK; \
} \
NS_IMETHOD IsSupported(const nsAString& aFeature, \
const nsAString& aVersion, \
PRBool* aReturn) { \
return nsGenericDOMDataNode::IsSupported(aFeature, aVersion, aReturn); \
} \
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { \
return nsNodeUtils::CloneNodeImpl(this, aDeep, aReturn); \
} \
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo, \
PRBool aCloneText) const;
1998-09-06 00:16:36 +00:00
1998-09-06 04:16:22 +00:00
#endif /* nsGenericDOMDataNode_h___ */