summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/CharacterData.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/CharacterData.h')
-rw-r--r--WebCore/dom/CharacterData.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/WebCore/dom/CharacterData.h b/WebCore/dom/CharacterData.h
index d9e55c0..6c31933 100644
--- a/WebCore/dom/CharacterData.h
+++ b/WebCore/dom/CharacterData.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -29,12 +29,6 @@ namespace WebCore {
class CharacterData : public Node {
public:
- CharacterData(Document*, const String& text, bool isText = false);
- CharacterData(Document*, bool isText = false);
- virtual ~CharacterData();
-
- // DOM methods & attributes for CharacterData
-
String data() const { return m_data; }
void setData(const String&, ExceptionCode&);
unsigned length() const { return m_data->length(); }
@@ -42,31 +36,30 @@ public:
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&);
+ void replaceData(unsigned offset, unsigned count, const String&, ExceptionCode&);
bool containsOnlyWhitespace() const;
- // DOM methods overridden from parent classes
-
- virtual String nodeValue() const;
- virtual void setNodeValue(const String&, ExceptionCode&);
-
- // Other methods (not part of DOM)
+ StringImpl* dataImpl() { return m_data.get(); }
- virtual bool isCharacterDataNode() const { return true; }
- virtual int maxCharacterOffset() const;
- StringImpl* string() { return m_data.get(); }
+protected:
+ CharacterData(Document*, const String&, ConstructionType);
- virtual bool offsetInCharacters() const;
virtual bool rendererIsNeeded(RenderStyle*);
-protected:
- RefPtr<StringImpl> m_data;
-
+ void setDataImpl(PassRefPtr<StringImpl> impl) { m_data = impl; }
void dispatchModifiedEvent(StringImpl* oldValue);
private:
+ virtual String nodeValue() const;
+ virtual void setNodeValue(const String&, ExceptionCode&);
+ virtual bool isCharacterDataNode() const { return true; }
+ virtual int maxCharacterOffset() const;
+ virtual bool offsetInCharacters() const;
+
void checkCharDataOperation(unsigned offset, ExceptionCode&);
+
+ RefPtr<StringImpl> m_data;
};
} // namespace WebCore