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

Issue 2729133005: Fix: Cursor missing in omnibox after entering a alphabet in NTP 'Search box' (Closed)

Created:
3 years, 9 months ago by yiyix
Modified:
3 years, 6 months ago
Reviewers:
msw, sadrul, sky
CC:
chromium-reviews, nona+watch_chromium.org, James Su, shuchen+watch_chromium.org, yusukes+watch_chromium.org, tfarina, sky
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix: Cursor missing in omnibox after entering a alphabet in NTP 'Search box' After any alphabet is entered in 'Search box', Textfield::DoInsertChar is called and it first updates the cursor visibility by calling UpdateAfterChange then it calls OnAfterUserAction to update the textfield focus and which may change the cursor visibility. If the cursor visibility is changed in OnAfterUserAction, the text cursor will not being updated again. The previous CL (https://codereview.chromium.org/2728433002/) exposed this wrong order of updating. TEST=TextfieldTest.CursorVisibilityChangeAfterInserting BUG=698172 Review-Url: https://codereview.chromium.org/2729133005 Cr-Commit-Position: refs/heads/master@{#456444} Committed: https://chromium.googlesource.com/chromium/src/+/c57eaf40e82246d8acb9f58a350ef1a619cb19b1

Patch Set 1 #

Total comments: 1

Patch Set 2 : add tests #

Total comments: 3

Patch Set 3 : address comments #

Total comments: 8

Patch Set 4 : address comments #

Total comments: 3

Patch Set 5 : new approach #

Total comments: 28

Patch Set 6 : address comments #

Total comments: 8

Patch Set 7 : address nits #

Total comments: 1

Patch Set 8 : fix spelling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -21 lines) Patch
M chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc View 1 2 3 4 5 6 7 2 chunks +15 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 5 chunks +18 lines, -9 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -10 lines 0 comments Download

Messages

Total messages: 61 (34 generated)
yiyix
@sadrul, could you please take a look? Thank you.
3 years, 9 months ago (2017-03-03 23:23:45 UTC) #3
sadrul
https://codereview.chromium.org/2729133005/diff/1/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/1/ui/views/controls/textfield/textfield.cc#newcode1267 ui/views/controls/textfield/textfield.cc:1267: OnAfterUserAction(); There are a few other places where OnAfterUserAction() ...
3 years, 9 months ago (2017-03-04 04:05:17 UTC) #8
yiyix
On 2017/03/04 04:05:17, sadrul wrote: > https://codereview.chromium.org/2729133005/diff/1/ui/views/controls/textfield/textfield.cc > File ui/views/controls/textfield/textfield.cc (right): > > https://codereview.chromium.org/2729133005/diff/1/ui/views/controls/textfield/textfield.cc#newcode1267 > ...
3 years, 9 months ago (2017-03-07 04:46:54 UTC) #12
sadrul
https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc#newcode772 ui/views/controls/textfield/textfield.cc:772: UpdateAfterChange(false, true); We shouldn't need this here? ExecuteTextEditCommand() should ...
3 years, 9 months ago (2017-03-08 02:02:52 UTC) #22
yiyix
https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc#newcode772 ui/views/controls/textfield/textfield.cc:772: UpdateAfterChange(false, true); On 2017/03/08 02:02:52, sadrul wrote: > We ...
3 years, 9 months ago (2017-03-08 03:32:41 UTC) #23
sadrul
Happy to discuss offline to explain things better. https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/60001/ui/views/controls/textfield/textfield.cc#newcode772 ui/views/controls/textfield/textfield.cc:772: UpdateAfterChange(false, ...
3 years, 9 months ago (2017-03-08 13:45:36 UTC) #24
yiyix
@sadrul, Thank you for the feedback. I have separated ExecuteTextEditCommand to ExecuteTextEditCommand AND ExecuteTextEditCommandImpl. Could ...
3 years, 9 months ago (2017-03-08 20:11:40 UTC) #25
sadrul
https://codereview.chromium.org/2729133005/diff/80001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc File chrome/browser/ui/views/omnibox/omnibox_view_views.cc (right): https://codereview.chromium.org/2729133005/diff/80001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc#newcode828 chrome/browser/ui/views/omnibox/omnibox_view_views.cc:828: return false; I feel like this should be true? ...
3 years, 9 months ago (2017-03-09 01:47:38 UTC) #26
yiyix
@sadrul, could you please take another look? Thank you. https://codereview.chromium.org/2729133005/diff/80001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc File chrome/browser/ui/views/omnibox/omnibox_view_views.cc (right): https://codereview.chromium.org/2729133005/diff/80001/chrome/browser/ui/views/omnibox/omnibox_view_views.cc#newcode828 chrome/browser/ui/views/omnibox/omnibox_view_views.cc:828: ...
3 years, 9 months ago (2017-03-09 02:45:33 UTC) #27
sadrul
+sky@ for chrome changes. lgtm
3 years, 9 months ago (2017-03-09 06:18:05 UTC) #29
sky
msw is a better reviewer than I for this. sky->msw
3 years, 9 months ago (2017-03-09 14:22:49 UTC) #31
msw
https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc#newcode1432 ui/views/controls/textfield/textfield.cc:1432: UpdateAfterChange(true, true); I really don't understand this change well ...
3 years, 9 months ago (2017-03-09 17:07:45 UTC) #32
yiyix
On 2017/03/09 17:07:45, msw wrote: > https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc > File ui/views/controls/textfield/textfield.cc (right): > > https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc#newcode1432 > ...
3 years, 9 months ago (2017-03-09 18:51:34 UTC) #33
sadrul
https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (right): https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.cc#newcode1432 ui/views/controls/textfield/textfield.cc:1432: UpdateAfterChange(true, true); On 2017/03/09 17:07:45, msw wrote: > I ...
3 years, 9 months ago (2017-03-09 18:55:06 UTC) #34
sky
https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.h File ui/views/controls/textfield/textfield.h (right): https://codereview.chromium.org/2729133005/diff/100001/ui/views/controls/textfield/textfield.h#newcode341 ui/views/controls/textfield/textfield.h:341: virtual bool ExecuteTextEditCommandImpl(ui::TextEditCommand command); Having to return whether state ...
3 years, 9 months ago (2017-03-09 19:31:24 UTC) #36
yiyix
The cursor is now updated in SetCursorEnabled instead. Could you please take look? Thank you.
3 years, 9 months ago (2017-03-09 20:47:11 UTC) #37
msw
This is *MUCH* better; thank you! I still have some comments. Hopefully we can inline ...
3 years, 9 months ago (2017-03-09 21:05:46 UTC) #40
msw
Please also remember to update the CL description
3 years, 9 months ago (2017-03-09 21:06:42 UTC) #41
yiyix
@msw, Could you please take a look at this new patch? I rewrite the test ...
3 years, 9 months ago (2017-03-10 20:19:30 UTC) #44
msw
Awesome, lgtm with minor comments; thank you for addressing my concerns. I'll keep an eye ...
3 years, 9 months ago (2017-03-10 21:04:30 UTC) #45
yiyix
https://codereview.chromium.org/2729133005/diff/140001/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc File chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc (right): https://codereview.chromium.org/2729133005/diff/140001/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc#newcode273 chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc:273: // Checks that if the text cursor is set ...
3 years, 9 months ago (2017-03-13 04:02:16 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2729133005/180001
3 years, 9 months ago (2017-03-13 04:02:40 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/405291)
3 years, 9 months ago (2017-03-13 04:26:59 UTC) #52
msw
still lgtm with one comment nit https://codereview.chromium.org/2729133005/diff/180001/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc File chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc (right): https://codereview.chromium.org/2729133005/diff/180001/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc#newcode274 chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc:274: // alphabet in ...
3 years, 9 months ago (2017-03-13 17:15:24 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2729133005/200001
3 years, 9 months ago (2017-03-13 17:50:52 UTC) #56
yiyix
On 2017/03/13 17:15:24, msw wrote: > still lgtm with one comment nit > > https://codereview.chromium.org/2729133005/diff/180001/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc ...
3 years, 9 months ago (2017-03-13 18:31:51 UTC) #57
commit-bot: I haz the power
3 years, 9 months ago (2017-03-13 18:43:35 UTC) #60
Message was sent while issue was closed.
Committed patchset #8 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/c57eaf40e82246d8acb9f58a350e...

Powered by Google App Engine
This is Rietveld 408576698