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

Issue 5972008: views: Improve cursor movements on word boundaries. (Closed)

Created:
9 years, 11 months ago by sadrul
Modified:
9 years, 6 months ago
Reviewers:
oshima
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

views: Improve cursor movements on word boundaries. (1) When there's blank space at the end of the string in the textfield and the cursor is at the end, 'move cursor to previous word' should move the cursor at the beginning of the last word. (2) When there's blank space at the end of the string, and the cursor is at the end of the last word, 'move cursor to next word' should move the cursor at the end. (3) Moving the cursor should make the cursor immediately visible. This is more inline with how GTK+ cursors behave. For example, constantly pressing the home-key in a GTK+ textfield makes the cursor visible for the duration of the keypress. BUG=none TEST=NativeTextfieldViewsTest.CursorMovement Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70468

Patch Set 1 #

Patch Set 2 : Add test case #

Patch Set 3 : ... #

Patch Set 4 : cleanups #

Total comments: 2

Patch Set 5 : Add a test with leading whitespace. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -12 lines) Patch
M views/controls/textfield/native_textfield_views.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M views/controls/textfield/native_textfield_views_unittest.cc View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
M views/controls/textfield/textfield_views_model.cc View 1 2 3 4 2 chunks +15 lines, -12 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
sadrul
9 years, 11 months ago (2011-01-02 01:09:46 UTC) #1
oshima
thank you for the patch. Could you please add test cases for word boundary fix?
9 years, 11 months ago (2011-01-04 19:20:19 UTC) #2
sadrul
On 2011/01/04 19:20:19, oshima wrote: > thank you for the patch. Could you please add ...
9 years, 11 months ago (2011-01-04 20:23:58 UTC) #3
oshima
http://codereview.chromium.org/5972008/diff/14001/views/controls/textfield/native_textfield_views_unittest.cc File views/controls/textfield/native_textfield_views_unittest.cc (right): http://codereview.chromium.org/5972008/diff/14001/views/controls/textfield/native_textfield_views_unittest.cc#newcode248 views/controls/textfield/native_textfield_views_unittest.cc:248: EXPECT_STR_EQ("one two three", last_contents_); can you add another test ...
9 years, 11 months ago (2011-01-04 21:53:24 UTC) #4
sadrul
Please take another look. http://codereview.chromium.org/5972008/diff/14001/views/controls/textfield/native_textfield_views_unittest.cc File views/controls/textfield/native_textfield_views_unittest.cc (right): http://codereview.chromium.org/5972008/diff/14001/views/controls/textfield/native_textfield_views_unittest.cc#newcode248 views/controls/textfield/native_textfield_views_unittest.cc:248: EXPECT_STR_EQ("one two three", last_contents_); On ...
9 years, 11 months ago (2011-01-04 23:25:44 UTC) #5
oshima
LGTM On 2011/01/04 23:25:44, sadrul wrote: > Please take another look. > > http://codereview.chromium.org/5972008/diff/14001/views/controls/textfield/native_textfield_views_unittest.cc > ...
9 years, 11 months ago (2011-01-05 00:09:18 UTC) #6
sadrul
9 years, 11 months ago (2011-01-05 00:36:48 UTC) #7
Thanks for the quick reviews :-)

Powered by Google App Engine
This is Rietveld 408576698