#ifndef CharacterData_h
#define CharacterData_h
#include "EventTargetNode.h"
namespace WebCore {
class CharacterData : public EventTargetNode {
public:
CharacterData(Document*, const String& text);
CharacterData(Document*);
virtual ~CharacterData();
String data() const { return m_data; }
void setData(const String&, ExceptionCode&);
unsigned length() const { return m_data->length(); }
String substringData(unsigned offset, unsigned count, ExceptionCode&);
void appendData(const String&, ExceptionCode&);
void insertData(unsigned offset, const String&, ExceptionCode&);
void deleteData(unsigned offset, unsigned count, ExceptionCode&);
void replaceData(unsigned offset, unsigned count, const String &arg, ExceptionCode&);
bool containsOnlyWhitespace() const;
virtual String nodeValue() const;
virtual void setNodeValue(const String&, ExceptionCode&);
virtual bool isCharacterDataNode() const { return true; }
virtual int maxCharacterOffset() const;
StringImpl* string() { return m_data.get(); }
virtual void checkCharDataOperation(unsigned offset, ExceptionCode&);
virtual bool offsetInCharacters() const;
virtual bool rendererIsNeeded(RenderStyle*);
#ifndef NDEBUG
virtual void dump(TextStream*, DeprecatedString indent = "") const;
#endif
protected:
RefPtr<StringImpl> m_data;
void dispatchModifiedEvent(StringImpl* oldValue);
};
}
#endif // CharacterData_h