2008-10-15 02:40:28 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-10-15 02:40:28 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Implementation of DOM Core's nsIDOMText node.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsGenericDOMDataNode.h"
|
|
|
|
#include "nsIDOMText.h"
|
2011-08-11 06:29:50 -07:00
|
|
|
|
2008-10-15 02:40:28 -07:00
|
|
|
/**
|
|
|
|
* Class used to implement DOM text nodes
|
|
|
|
*/
|
2011-05-20 22:21:28 -07:00
|
|
|
class nsTextNode : public nsGenericDOMDataNode,
|
2008-10-15 02:40:28 -07:00
|
|
|
public nsIDOMText
|
|
|
|
{
|
|
|
|
public:
|
2010-07-23 02:49:57 -07:00
|
|
|
nsTextNode(already_AddRefed<nsINodeInfo> aNodeInfo);
|
2008-10-15 02:40:28 -07:00
|
|
|
virtual ~nsTextNode();
|
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIDOMNode
|
2011-06-14 00:56:48 -07:00
|
|
|
NS_FORWARD_NSIDOMNODE(nsGenericDOMDataNode::)
|
2008-10-15 02:40:28 -07:00
|
|
|
|
|
|
|
// nsIDOMCharacterData
|
|
|
|
NS_FORWARD_NSIDOMCHARACTERDATA(nsGenericDOMDataNode::)
|
|
|
|
|
|
|
|
// nsIDOMText
|
|
|
|
NS_FORWARD_NSIDOMTEXT(nsGenericDOMDataNode::)
|
|
|
|
|
2011-06-14 00:56:48 -07:00
|
|
|
// nsINode
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual bool IsNodeOfType(uint32_t aFlags) const;
|
2011-06-14 00:56:48 -07:00
|
|
|
|
|
|
|
virtual nsGenericDOMDataNode* CloneDataNode(nsINodeInfo *aNodeInfo,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aCloneText) const;
|
2011-06-14 00:56:48 -07:00
|
|
|
|
2010-07-23 02:49:57 -07:00
|
|
|
virtual nsXPCClassInfo* GetClassInfo();
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
nsresult AppendTextForNormalize(const PRUnichar* aBuffer, uint32_t aLength,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aNotify, nsIContent* aNextSibling);
|
2011-08-15 17:55:20 -07:00
|
|
|
|
2012-04-25 06:47:30 -07:00
|
|
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
|
|
|
|
2008-10-15 02:40:28 -07:00
|
|
|
#ifdef DEBUG
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual void List(FILE* out, int32_t aIndent) const;
|
|
|
|
virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const;
|
2008-10-15 02:40:28 -07:00
|
|
|
#endif
|
|
|
|
};
|