diff options
author | Ben Murdoch <benm@google.com> | 2009-08-18 15:36:45 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-18 19:20:06 +0100 |
commit | d227fc870c7a697500a3c900c31baf05fb9a8524 (patch) | |
tree | a3fa109aa5bf52fef562ac49d97a2f723889cc71 /WebCore/dom/Text.h | |
parent | f2c627513266faa73f7669058d98c60769fb3524 (diff) | |
download | external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.zip external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.gz external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.bz2 |
Merge WebKit r47420
Diffstat (limited to 'WebCore/dom/Text.h')
-rw-r--r-- | WebCore/dom/Text.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/WebCore/dom/Text.h b/WebCore/dom/Text.h index e5a6e69..4722736 100644 --- a/WebCore/dom/Text.h +++ b/WebCore/dom/Text.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, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 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 @@ -27,44 +27,39 @@ namespace WebCore { -const unsigned cTextNodeLengthLimit = 1 << 16; - class Text : public CharacterData { public: - Text(Document *impl, const String &_text); - Text(Document *impl); - virtual ~Text(); + static const unsigned defaultLengthLimit = 1 << 16; - // DOM methods & attributes for CharacterData + static PassRefPtr<Text> create(Document*, const String&); + static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsigned& charsLeft, unsigned lengthLimit = defaultLengthLimit); PassRefPtr<Text> splitText(unsigned offset, ExceptionCode&); // DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1312295772 + String wholeText() const; PassRefPtr<Text> replaceWholeText(const String&, ExceptionCode&); - // DOM methods overridden from parent classes + virtual void attach(); + +protected: + Text(Document*, const String&); +private: virtual String nodeName() const; virtual NodeType nodeType() const; virtual PassRefPtr<Node> cloneNode(bool deep); - - // Other methods (not part of DOM) - - virtual void attach(); virtual bool rendererIsNeeded(RenderStyle*); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void recalcStyle(StyleChange = NoChange); virtual bool childTypeAllowed(NodeType); - static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsigned& charsLeft, unsigned maxChars = cTextNodeLengthLimit); + virtual PassRefPtr<Text> virtualCreate(const String&); #ifndef NDEBUG virtual void formatForDebugger(char* buffer, unsigned length) const; #endif - -protected: - virtual PassRefPtr<Text> createNew(PassRefPtr<StringImpl>); }; } // namespace WebCore |