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, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 private: | 153 private: |
154 float textPos() const; // returns the x position relative to the left start
of the text line. | 154 float textPos() const; // returns the x position relative to the left start
of the text line. |
155 | 155 |
156 public: | 156 public: |
157 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con
st; | 157 virtual int offsetForPosition(float x, bool includePartialGlyphs = true) con
st; |
158 virtual float positionForOffset(int offset) const; | 158 virtual float positionForOffset(int offset) const; |
159 | 159 |
160 bool containsCaretOffset(int offset) const; // false for offset after line b
reak | 160 bool containsCaretOffset(int offset) const; // false for offset after line b
reak |
161 | 161 |
| 162 // Fills a vector with the pixel width of each character. |
| 163 void characterWidths(Vector<float>&) const; |
| 164 |
162 private: | 165 private: |
163 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderO
bject | 166 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderO
bject |
164 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObjec
t | 167 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObjec
t |
165 | 168 |
166 int m_start; | 169 int m_start; |
167 unsigned short m_len; | 170 unsigned short m_len; |
168 | 171 |
169 unsigned short m_truncation; // Where to truncate when text overflow is appl
ied. We use special constants to | 172 unsigned short m_truncation; // Where to truncate when text overflow is appl
ied. We use special constants to |
170 // denote no truncation (the whole run paints) and full tr
uncation (nothing paints at all). | 173 // denote no truncation (the whole run paints) and full tr
uncation (nothing paints at all). |
171 | 174 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 inline RenderText* InlineTextBox::textRenderer() const | 208 inline RenderText* InlineTextBox::textRenderer() const |
206 { | 209 { |
207 return toRenderText(renderer()); | 210 return toRenderText(renderer()); |
208 } | 211 } |
209 | 212 |
210 void alignSelectionRectToDevicePixels(FloatRect&); | 213 void alignSelectionRectToDevicePixels(FloatRect&); |
211 | 214 |
212 } // namespace WebCore | 215 } // namespace WebCore |
213 | 216 |
214 #endif // InlineTextBox_h | 217 #endif // InlineTextBox_h |
OLD | NEW |