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

Issue 9358049: Implement STYLE_LOWERCASE style for Aura NativeTextfield. (Closed)

Created:
8 years, 10 months ago by kochi
Modified:
8 years, 8 months ago
CC:
chromium-reviews, tfarina, James Su, penghuang+watch_chromium.org, yusukes+watch_chromium.org
Visibility:
Public.

Description

Implement STYLE_LOWERCASE style for Aura NativeTextfield. BUG=109308 TEST=views_unittest --gtest_filter="NativeTextfieldViews*" Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132525

Patch Set 1 #

Patch Set 2 : Refine the patch. #

Total comments: 20

Patch Set 3 : rebase. #

Total comments: 4

Patch Set 4 : rebase. #

Patch Set 5 : update for comments. #

Total comments: 9

Patch Set 6 : Fix for comments, added locale-dependent conversion test. #

Patch Set 7 : rebase. #

Patch Set 8 : Fix comments for Paste(). #

Total comments: 3

Patch Set 9 : fix for comments. #

Total comments: 4

Patch Set 10 : Add MaybeLowerCase(), test descriptions and cursor position assertion. #

Total comments: 10

Patch Set 11 : Change MaybeLowerCase() to GetTextForDisplay() #

Total comments: 8

Patch Set 12 : fix for comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -23 lines) Patch
M chrome/browser/ui/views/edit_search_engine_dialog.cc View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/textfield/native_textfield_views.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +30 lines, -13 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +78 lines, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield_views_model.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
kochi
Hi, Could you review this?
8 years, 10 months ago (2012-02-15 05:09:04 UTC) #1
xji
The assumption is: lower-cased text is saved in RenderText, and there will never be any ...
8 years, 10 months ago (2012-02-17 22:38:24 UTC) #2
msw
Why not transform the text at the Textfield level (ui/views/controls/textfield/textfield.cc)? That would make this work ...
8 years, 10 months ago (2012-02-18 00:32:38 UTC) #3
xji
On 2012/02/18 00:32:38, msw wrote: > Why not transform the text at the Textfield level ...
8 years, 10 months ago (2012-02-18 01:31:44 UTC) #4
xji
http://codereview.chromium.org/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc#newcode687 ui/views/controls/textfield/native_textfield_views.cc:687: new_text = base::i18n::ToLower(new_text); On 2012/02/18 00:32:38, msw wrote: > ...
8 years, 10 months ago (2012-02-18 01:33:38 UTC) #5
kochi
Sorry for the delay. I'm distracted by other issues, and this is not yet done. ...
8 years, 10 months ago (2012-02-23 10:49:07 UTC) #6
xji
http://codereview.chromium.org/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc#newcode194 ui/views/controls/textfield/native_textfield_views.cc:194: text = base::i18n::ToLower(text); On 2012/02/23 10:49:07, Takayoshi Kochi wrote: ...
8 years, 10 months ago (2012-02-23 21:59:16 UTC) #7
jungshik at Google
Sorry for the terribly late reply. http://codereview.chromium.org/9358049/diff/16001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/16001/ui/views/controls/textfield/native_textfield_views.cc#newcode697 ui/views/controls/textfield/native_textfield_views.cc:697: void NativeTextfieldViews::InsertChar(char16 ch, ...
8 years, 9 months ago (2012-03-26 22:04:34 UTC) #8
kochi
Sorry for the long interval. I was distracted by other tasks. Please take another look. ...
8 years, 8 months ago (2012-04-09 06:34:20 UTC) #9
msw
http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc#newcode1063 ui/views/controls/textfield/native_textfield_views.cc:1063: // lower-case characters. This is not consistent with other ...
8 years, 8 months ago (2012-04-09 18:29:24 UTC) #10
kochi
http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc#newcode1063 ui/views/controls/textfield/native_textfield_views.cc:1063: // lower-case characters. This is not consistent with other ...
8 years, 8 months ago (2012-04-10 07:38:11 UTC) #11
msw
http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/24001/ui/views/controls/textfield/native_textfield_views.cc#newcode1069 ui/views/controls/textfield/native_textfield_views.cc:1069: // action did not change the content at all. ...
8 years, 8 months ago (2012-04-10 07:50:25 UTC) #12
xji
http://chromiumcodereview.appspot.com/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc#newcode1069 ui/views/controls/textfield/native_textfield_views.cc:1069: if (success && GetText() == textfield_->text()) { GetText() is ...
8 years, 8 months ago (2012-04-10 22:53:26 UTC) #13
kochi
http://chromiumcodereview.appspot.com/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/2001/ui/views/controls/textfield/native_textfield_views.cc#newcode1069 ui/views/controls/textfield/native_textfield_views.cc:1069: if (success && GetText() == textfield_->text()) { I see, ...
8 years, 8 months ago (2012-04-11 01:56:41 UTC) #14
xji
http://chromiumcodereview.appspot.com/9358049/diff/39002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/39002/ui/views/controls/textfield/native_textfield_views.cc#newcode1077 ui/views/controls/textfield/native_textfield_views.cc:1077: if (GetText() == base::i18n::ToLower(textfield_->text())) { ToLower() here should only ...
8 years, 8 months ago (2012-04-11 04:06:35 UTC) #15
kochi
http://chromiumcodereview.appspot.com/9358049/diff/39002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://chromiumcodereview.appspot.com/9358049/diff/39002/ui/views/controls/textfield/native_textfield_views.cc#newcode1077 ui/views/controls/textfield/native_textfield_views.cc:1077: if (GetText() == base::i18n::ToLower(textfield_->text())) { On 2012/04/11 04:06:35, xji ...
8 years, 8 months ago (2012-04-11 04:49:27 UTC) #16
xji
lgtm
8 years, 8 months ago (2012-04-11 17:09:56 UTC) #17
kochi
Ben or Scott, could you take a look for OWNER lgtm? Thanks!
8 years, 8 months ago (2012-04-12 00:47:42 UTC) #18
sky
http://codereview.chromium.org/9358049/diff/47001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/47001/ui/views/controls/textfield/native_textfield_views.cc#newcode200 ui/views/controls/textfield/native_textfield_views.cc:200: if (textfield_->style() & Textfield::STYLE_LOWERCASE) You check STYLE_LOWERCASE in a ...
8 years, 8 months ago (2012-04-12 03:58:33 UTC) #19
kochi
http://codereview.chromium.org/9358049/diff/47001/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/47001/ui/views/controls/textfield/native_textfield_views.cc#newcode200 ui/views/controls/textfield/native_textfield_views.cc:200: if (textfield_->style() & Textfield::STYLE_LOWERCASE) Added MaybeLowerCase() and use it ...
8 years, 8 months ago (2012-04-12 05:39:01 UTC) #20
sky
http://codereview.chromium.org/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc#newcode1133 ui/views/controls/textfield/native_textfield_views.cc:1133: void NativeTextfieldViews::MaybeLowerCase(string16* text) { I think making this return ...
8 years, 8 months ago (2012-04-12 15:28:56 UTC) #21
msw
http://codereview.chromium.org/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): http://codereview.chromium.org/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc#newcode1065 ui/views/controls/textfield/native_textfield_views.cc:1065: // As Paste is handled in model_->Paste(), the RenderText ...
8 years, 8 months ago (2012-04-12 16:15:29 UTC) #22
kochi
Thanks for all the comments. https://chromiumcodereview.appspot.com/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): https://chromiumcodereview.appspot.com/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc#newcode1065 ui/views/controls/textfield/native_textfield_views.cc:1065: // As Paste is ...
8 years, 8 months ago (2012-04-13 09:44:09 UTC) #23
sky
LGTM
8 years, 8 months ago (2012-04-13 15:52:50 UTC) #24
msw
https://chromiumcodereview.appspot.com/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): https://chromiumcodereview.appspot.com/9358049/diff/37002/ui/views/controls/textfield/native_textfield_views.cc#newcode1065 ui/views/controls/textfield/native_textfield_views.cc:1065: // As Paste is handled in model_->Paste(), the RenderText ...
8 years, 8 months ago (2012-04-13 18:13:25 UTC) #25
kochi
https://chromiumcodereview.appspot.com/9358049/diff/52004/ui/views/controls/textfield/native_textfield_views.cc File ui/views/controls/textfield/native_textfield_views.cc (right): https://chromiumcodereview.appspot.com/9358049/diff/52004/ui/views/controls/textfield/native_textfield_views.cc#newcode325 ui/views/controls/textfield/native_textfield_views.cc:325: model_->SetText(GetTextForDisplay(text)); On 2012/04/13 18:13:25, msw wrote: > nit: model_->SetText(GetTextForDisplay(textfield_->text())); ...
8 years, 8 months ago (2012-04-16 04:54:18 UTC) #26
msw
LGTM; thanks!
8 years, 8 months ago (2012-04-16 17:11:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kochi@chromium.org/9358049/58001
8 years, 8 months ago (2012-04-17 01:09:38 UTC) #28
kochi
On 2012/04/16 17:11:19, msw wrote: > LGTM; thanks! Thanks for your patience!
8 years, 8 months ago (2012-04-17 01:10:04 UTC) #29
commit-bot: I haz the power
8 years, 8 months ago (2012-04-17 02:46:53 UTC) #30
Change committed as 132525

Powered by Google App Engine
This is Rietveld 408576698