diff options
Diffstat (limited to 'views/controls/textfield/textfield_views_model.cc')
-rw-r--r-- | views/controls/textfield/textfield_views_model.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/views/controls/textfield/textfield_views_model.cc b/views/controls/textfield/textfield_views_model.cc index 6e3b425..af5e368 100644 --- a/views/controls/textfield/textfield_views_model.cc +++ b/views/controls/textfield/textfield_views_model.cc @@ -622,19 +622,6 @@ bool TextfieldViewsModel::MoveCursorTo(size_t pos, bool select) { return changed; } -gfx::Rect TextfieldViewsModel::GetCursorBounds(const gfx::Font& font) const { - string16 text = GetVisibleText(); - int x = font.GetStringWidth(text.substr(0U, cursor_pos_)); - int h = font.GetHeight(); - DCHECK(x >= 0); - if (text.length() == cursor_pos_) { - return gfx::Rect(x, 0, 0, h); - } else { - int x_end = font.GetStringWidth(text.substr(0U, cursor_pos_ + 1U)); - return gfx::Rect(x, 0, x_end - x, h); - } -} - gfx::Rect TextfieldViewsModel::GetSelectionBounds(const gfx::Font& font) const { if (!HasSelection()) return gfx::Rect(); |