Changeset 13067 for trunk/WebCore/rendering/RenderText.h
- Timestamp:
- 02/28/06 23:49:33 (3 years ago)
- Files:
-
- 1 modified
-
trunk/WebCore/rendering/RenderText.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/rendering/RenderText.h
r13063 r13067 33 33 class QFontMetrics; 34 34 35 namespace DOM { 36 class DOMString; 37 class DOMStringImpl; 38 class DocumentMarker; 39 class Position; 40 class QPainter; 41 }; 35 namespace WebCore { 42 36 43 37 // Define a constant for soft hyphen's unicode value. 44 38 const unsigned short SOFT_HYPHEN = 173; 45 39 46 namespace khtml 47 { 48 class InlineBox; 40 class DocumentMarker; 41 class InlineBox; 42 class Position; 43 class String; 44 class StringImpl; 49 45 50 class RenderText : public RenderObject 51 { 46 class RenderText : public RenderObject { 52 47 friend class InlineTextBox; 53 48 54 49 public: 55 RenderText( DOM::NodeImpl*, DOM::DOMStringImpl*);50 RenderText(NodeImpl*, StringImpl*); 56 51 57 52 virtual bool isTextFragment() const; 58 virtual PassRefPtr< DOM::DOMStringImpl> originalString() const;53 virtual PassRefPtr<StringImpl> originalString() const; 59 54 60 55 virtual const char *renderName() const { return "RenderText"; } … … 68 63 virtual void destroy(); 69 64 70 DOM::DOMString data() const { return str.get(); }71 DOM::DOMStringImpl* string() const { return str.get(); }65 String data() const { return str.get(); } 66 StringImpl* string() const { return str.get(); } 72 67 73 68 virtual InlineBox* createInlineBox(bool,bool, bool isOnlyRun = false); … … 85 80 virtual VisiblePosition positionForCoordinates(int x, int y); 86 81 87 unsigned int length() const { return str->l ; }88 QChar *text() const { return str->s; }89 unsigned int stringLength() const { return str->l ; } // non virtual implementation of length()82 unsigned int length() const { return str->length(); } 83 const QChar* text() const { return str->unicode(); } 84 unsigned int stringLength() const { return str->length(); } // non virtual implementation of length() 90 85 virtual void position(InlineBox* box, int from, int len, bool reverse, bool override); 91 86 … … 125 120 virtual short verticalPositionHint( bool firstLine ) const; 126 121 127 void setText( DOM::DOMStringImpl*, bool force = false);128 void setTextWithOffset( DOM::DOMStringImpl*, uint offset, uint len, bool force = false);122 void setText(StringImpl*, bool force = false); 123 void setTextWithOffset(StringImpl*, uint offset, uint len, bool force = false); 129 124 130 125 virtual bool canBeSelectionLeaf() const { return true; } … … 143 138 const Font* font(bool firstLine) const; 144 139 145 DOM::TextImpl *element() const { return static_cast<DOM::TextImpl*>(RenderObject::element()); }140 TextImpl *element() const { return static_cast<TextImpl*>(RenderObject::element()); } 146 141 147 142 InlineTextBox* firstTextBox() const { return m_firstTextBox; } … … 169 164 170 165 protected: // members 171 RefPtr< DOM::DOMStringImpl> str;166 RefPtr<StringImpl> str; 172 167 173 168 InlineTextBox* m_firstTextBox;