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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 void updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfRepl
acedData); | 51 void updateTextRenderer(unsigned offsetOfReplacedData, unsigned lengthOfRepl
acedData); |
52 | 52 |
53 virtual void attach(); | 53 virtual void attach(); |
54 | 54 |
55 virtual bool canContainRangeEndPoint() const { return true; } | 55 virtual bool canContainRangeEndPoint() const { return true; } |
56 | 56 |
57 protected: | 57 protected: |
58 Text(Document* document, const String& data, ConstructionType type) | 58 Text(Document* document, const String& data, ConstructionType type) |
59 : CharacterData(document, data, type) | 59 : CharacterData(document, data, type) |
60 { | 60 { |
| 61 ScriptWrappable::init(this); |
61 } | 62 } |
62 | 63 |
63 private: | 64 private: |
64 virtual String nodeName() const; | 65 virtual String nodeName() const; |
65 virtual NodeType nodeType() const; | 66 virtual NodeType nodeType() const; |
66 virtual PassRefPtr<Node> cloneNode(bool deep); | 67 virtual PassRefPtr<Node> cloneNode(bool deep); |
67 virtual bool childTypeAllowed(NodeType) const; | 68 virtual bool childTypeAllowed(NodeType) const; |
68 | 69 |
69 virtual PassRefPtr<Text> virtualCreate(const String&); | 70 virtual PassRefPtr<Text> virtualCreate(const String&); |
70 | 71 |
71 #ifndef NDEBUG | 72 #ifndef NDEBUG |
72 virtual void formatForDebugger(char* buffer, unsigned length) const; | 73 virtual void formatForDebugger(char* buffer, unsigned length) const; |
73 #endif | 74 #endif |
74 }; | 75 }; |
75 | 76 |
76 inline Text* toText(Node* node) | 77 inline Text* toText(Node* node) |
77 { | 78 { |
78 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isTextNode()); | 79 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isTextNode()); |
79 return static_cast<Text*>(node); | 80 return static_cast<Text*>(node); |
80 } | 81 } |
81 | 82 |
82 } // namespace WebCore | 83 } // namespace WebCore |
83 | 84 |
84 #endif // Text_h | 85 #endif // Text_h |
OLD | NEW |