OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
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 26 matching lines...) Expand all Loading... |
37 class RenderText : public RenderObject { | 37 class RenderText : public RenderObject { |
38 public: | 38 public: |
39 // FIXME: If the node argument is not a Text node or the string argument is | 39 // FIXME: If the node argument is not a Text node or the string argument is |
40 // not the content of the Text node, updating text-transform property | 40 // not the content of the Text node, updating text-transform property |
41 // doesn't re-transform the string. | 41 // doesn't re-transform the string. |
42 RenderText(Node*, PassRefPtr<StringImpl>); | 42 RenderText(Node*, PassRefPtr<StringImpl>); |
43 #ifndef NDEBUG | 43 #ifndef NDEBUG |
44 virtual ~RenderText(); | 44 virtual ~RenderText(); |
45 #endif | 45 #endif |
46 | 46 |
47 virtual const char* renderName() const; | 47 virtual const char* renderName() const OVERRIDE; |
48 | 48 |
49 virtual bool isTextFragment() const; | 49 virtual bool isTextFragment() const; |
50 virtual bool isWordBreak() const; | 50 virtual bool isWordBreak() const; |
51 | 51 |
52 virtual PassRefPtr<StringImpl> originalText() const; | 52 virtual PassRefPtr<StringImpl> originalText() const; |
53 | 53 |
54 void extractTextBox(InlineTextBox*); | 54 void extractTextBox(InlineTextBox*); |
55 void attachTextBox(InlineTextBox*); | 55 void attachTextBox(InlineTextBox*); |
56 void removeTextBox(InlineTextBox*); | 56 void removeTextBox(InlineTextBox*); |
57 | 57 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 FloatPoint firstRunOrigin() const; | 103 FloatPoint firstRunOrigin() const; |
104 float firstRunX() const; | 104 float firstRunX() const; |
105 float firstRunY() const; | 105 float firstRunY() const; |
106 | 106 |
107 virtual void setText(PassRefPtr<StringImpl>, bool force = false); | 107 virtual void setText(PassRefPtr<StringImpl>, bool force = false); |
108 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len
, bool force = false); | 108 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len
, bool force = false); |
109 | 109 |
110 virtual void transformText(); | 110 virtual void transformText(); |
111 | 111 |
112 virtual bool canBeSelectionLeaf() const { return true; } | 112 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } |
113 virtual void setSelectionState(SelectionState s) OVERRIDE FINAL; | 113 virtual void setSelectionState(SelectionState s) OVERRIDE FINAL; |
114 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep
aintContainer, bool clipToVisibleContent = true) OVERRIDE; | 114 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* rep
aintContainer, bool clipToVisibleContent = true) OVERRIDE; |
115 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0); | 115 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE; |
116 | 116 |
117 LayoutUnit marginLeft() const { return minimumValueForLength(style()->margin
Left(), 0); } | 117 LayoutUnit marginLeft() const { return minimumValueForLength(style()->margin
Left(), 0); } |
118 LayoutUnit marginRight() const { return minimumValueForLength(style()->margi
nRight(), 0); } | 118 LayoutUnit marginRight() const { return minimumValueForLength(style()->margi
nRight(), 0); } |
119 | 119 |
120 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE FINAL; | 120 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE FINAL; |
121 | 121 |
122 InlineTextBox* firstTextBox() const { return m_firstTextBox; } | 122 InlineTextBox* firstTextBox() const { return m_firstTextBox; } |
123 InlineTextBox* lastTextBox() const { return m_lastTextBox; } | 123 InlineTextBox* lastTextBox() const { return m_lastTextBox; } |
124 | 124 |
125 virtual int caretMinOffset() const; | 125 virtual int caretMinOffset() const OVERRIDE; |
126 virtual int caretMaxOffset() const; | 126 virtual int caretMaxOffset() const OVERRIDE; |
127 unsigned renderedTextLength() const; | 127 unsigned renderedTextLength() const; |
128 | 128 |
129 virtual int previousOffset(int current) const OVERRIDE FINAL; | 129 virtual int previousOffset(int current) const OVERRIDE FINAL; |
130 virtual int previousOffsetForBackwardDeletion(int current) const OVERRIDE FI
NAL; | 130 virtual int previousOffsetForBackwardDeletion(int current) const OVERRIDE FI
NAL; |
131 virtual int nextOffset(int current) const OVERRIDE FINAL; | 131 virtual int nextOffset(int current) const OVERRIDE FINAL; |
132 | 132 |
133 bool containsReversedText() const { return m_containsReversedText; } | 133 bool containsReversedText() const { return m_containsReversedText; } |
134 | 134 |
135 bool isSecure() const { return style()->textSecurity() != TSNONE; } | 135 bool isSecure() const { return style()->textSecurity() != TSNONE; } |
136 void momentarilyRevealLastTypedCharacter(unsigned lastTypedCharacterOffset); | 136 void momentarilyRevealLastTypedCharacter(unsigned lastTypedCharacterOffset); |
137 | 137 |
138 InlineTextBox* findNextInlineTextBox(int offset, int& pos) const; | 138 InlineTextBox* findNextInlineTextBox(int offset, int& pos) const; |
139 | 139 |
140 void checkConsistency() const; | 140 void checkConsistency() const; |
141 | 141 |
142 bool isAllCollapsibleWhitespace() const; | 142 bool isAllCollapsibleWhitespace() const; |
143 | 143 |
144 bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; } | 144 bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; } |
145 bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveN
oOverflowAndNoFallbackFonts; } | 145 bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveN
oOverflowAndNoFallbackFonts; } |
146 | 146 |
147 void removeAndDestroyTextBoxes(); | 147 void removeAndDestroyTextBoxes(); |
148 | 148 |
149 PassRefPtr<AbstractInlineTextBox> firstAbstractInlineTextBox(); | 149 PassRefPtr<AbstractInlineTextBox> firstAbstractInlineTextBox(); |
150 | 150 |
151 protected: | 151 protected: |
152 virtual void computePreferredLogicalWidths(float leadWidth); | 152 virtual void computePreferredLogicalWidths(float leadWidth); |
153 virtual void willBeDestroyed(); | 153 virtual void willBeDestroyed() OVERRIDE; |
154 | 154 |
155 virtual void styleWillChange(StyleDifference, const RenderStyle*) OVERRIDE F
INAL { } | 155 virtual void styleWillChange(StyleDifference, const RenderStyle*) OVERRIDE F
INAL { } |
156 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 156 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
157 | 157 |
158 virtual void setTextInternal(PassRefPtr<StringImpl>); | 158 virtual void setTextInternal(PassRefPtr<StringImpl>); |
159 virtual UChar previousCharacter() const; | 159 virtual UChar previousCharacter() const; |
160 | 160 |
161 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t OVERRIDE; | 161 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t OVERRIDE; |
162 | 162 |
163 virtual InlineTextBox* createTextBox(); // Subclassed by SVG. | 163 virtual InlineTextBox* createTextBox(); // Subclassed by SVG. |
164 | 164 |
165 private: | 165 private: |
166 void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFont
Data*>& fallbackFonts, GlyphOverflow&); | 166 void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFont
Data*>& fallbackFonts, GlyphOverflow&); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 inline void RenderText::checkConsistency() const | 230 inline void RenderText::checkConsistency() const |
231 { | 231 { |
232 } | 232 } |
233 #endif | 233 #endif |
234 | 234 |
235 void applyTextTransform(const RenderStyle*, String&, UChar); | 235 void applyTextTransform(const RenderStyle*, String&, UChar); |
236 | 236 |
237 } // namespace WebCore | 237 } // namespace WebCore |
238 | 238 |
239 #endif // RenderText_h | 239 #endif // RenderText_h |
OLD | NEW |