| 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 |
| 165 bool isRTL() const; |
| 166 |
| 162 private: | 167 private: |
| 163 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderO
bject | 168 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 | 169 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObjec
t |
| 165 | 170 |
| 166 int m_start; | 171 int m_start; |
| 167 unsigned short m_len; | 172 unsigned short m_len; |
| 168 | 173 |
| 169 unsigned short m_truncation; // Where to truncate when text overflow is appl
ied. We use special constants to | 174 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). | 175 // denote no truncation (the whole run paints) and full tr
uncation (nothing paints at all). |
| 171 | 176 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 inline RenderText* InlineTextBox::textRenderer() const | 210 inline RenderText* InlineTextBox::textRenderer() const |
| 206 { | 211 { |
| 207 return toRenderText(renderer()); | 212 return toRenderText(renderer()); |
| 208 } | 213 } |
| 209 | 214 |
| 210 void alignSelectionRectToDevicePixels(FloatRect&); | 215 void alignSelectionRectToDevicePixels(FloatRect&); |
| 211 | 216 |
| 212 } // namespace WebCore | 217 } // namespace WebCore |
| 213 | 218 |
| 214 #endif // InlineTextBox_h | 219 #endif // InlineTextBox_h |
| OLD | NEW |