Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: views/controls/textfield/textfield_views_model.cc

Issue 6982055: Draw a NativeTextfieldViews drop location cursor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Combine cursor bounds data members, revise UpdateCursorBoundsAndTextOffset. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/textfield/textfield_views_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield_views_model.cc
diff --git a/views/controls/textfield/textfield_views_model.cc b/views/controls/textfield/textfield_views_model.cc
index 6e3b425aed5eb6c9ce40c8c1fdcb529f133075e7..af5e36871445c75f7ec26727c36b9da327e7c444 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();
« no previous file with comments | « views/controls/textfield/textfield_views_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698