| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 namespace WebCore { | 28 namespace WebCore { |
| 29 | 29 |
| 30 class ExceptionState; | 30 class ExceptionState; |
| 31 class RenderText; | 31 class RenderText; |
| 32 class ScriptExecutionContext; | 32 class ScriptExecutionContext; |
| 33 | 33 |
| 34 class Text : public CharacterData { | 34 class Text : public CharacterData { |
| 35 public: | 35 public: |
| 36 static const unsigned defaultLengthLimit = 1 << 16; | 36 static const unsigned defaultLengthLimit = 1 << 16; |
| 37 | 37 |
| 38 static PassRefPtr<Text> create(Document& document, const String& data) |
| 39 { |
| 40 return create(&document, data); |
| 41 } |
| 42 |
| 38 static PassRefPtr<Text> create(Document*, const String&); | 43 static PassRefPtr<Text> create(Document*, const String&); |
| 39 static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsi
gned positionInString, unsigned lengthLimit = defaultLengthLimit); | 44 static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsi
gned positionInString, unsigned lengthLimit = defaultLengthLimit); |
| 40 static PassRefPtr<Text> createEditingText(Document*, const String&); | 45 static PassRefPtr<Text> createEditingText(Document*, const String&); |
| 41 | 46 |
| 42 PassRefPtr<Text> splitText(unsigned offset, ExceptionState&); | 47 PassRefPtr<Text> splitText(unsigned offset, ExceptionState&); |
| 43 | 48 |
| 44 // DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-131229577
2 | 49 // DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-131229577
2 |
| 45 | 50 |
| 46 String wholeText() const; | 51 String wholeText() const; |
| 47 PassRefPtr<Text> replaceWholeText(const String&); | 52 PassRefPtr<Text> replaceWholeText(const String&); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 84 |
| 80 inline Text* toText(Node* node) | 85 inline Text* toText(Node* node) |
| 81 { | 86 { |
| 82 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isTextNode()); | 87 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isTextNode()); |
| 83 return static_cast<Text*>(node); | 88 return static_cast<Text*>(node); |
| 84 } | 89 } |
| 85 | 90 |
| 86 } // namespace WebCore | 91 } // namespace WebCore |
| 87 | 92 |
| 88 #endif // Text_h | 93 #endif // Text_h |
| OLD | NEW |