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

Issue 8748001: Make text input type and password visibility bit independent in Textfield (Closed)

Created:
9 years ago by benrg
Modified:
7 years ago
Reviewers:
bryeung, Peng, oshima
CC:
chromium-reviews, nkostylev+watch_chromium.org, tfarina, penghuang+watch_chromium.org, yusukes+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, dhollowa, Emmanuel Saint-loubert-BiƩ
Visibility:
Public.

Description

Rename STYLE_PASSWORD to STYLE_OBSCURED and make it independent from SetTextInputType(TEXT_INPUT_TYPE_PASSWORD). The input type of a password field should always be TEXT_INPUT_TYPE_PASSWORD, but STYLE_OBSCURED may not be set (e.g., when showing a wifi password). BUG=105054 TEST=none

Patch Set 1 : rebase #

Total comments: 4

Patch Set 2 : move IsPassword() back to .cc #

Total comments: 2

Patch Set 3 : make password style bit and input type independent; rename bit to "obscured" #

Patch Set 4 : more renaming #

Patch Set 5 : Textfield(STYLE_OBSCURED) sets TEXT_INPUT_TYPE_PASSWORD #

Total comments: 5

Patch Set 6 : fix comments, add a test #

Patch Set 7 : rebase, fix tests of TextInputType in NativeTextfieldViews #

Patch Set 8 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -50 lines) Patch
M ui/views/controls/textfield/native_textfield_views_unittest.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -31 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_win.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -2 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -12 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 3 4 5 6 7 2 chunks +13 lines, -3 lines 1 comment Download

Messages

Total messages: 27 (0 generated)
benrg
Can you take a look at this, since I think you wrote the original code?
9 years ago (2011-11-30 19:19:05 UTC) #1
bryeung
I'm not very up to date on what is happening with this code. When I ...
9 years ago (2011-11-30 19:27:52 UTC) #2
tfarina
http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h File ui/views/controls/textfield/textfield.h (right): http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h#newcode69 ui/views/controls/textfield/textfield.h:69: return style() & STYLE_PASSWORD; nit: please use style_ here ...
9 years ago (2011-11-30 19:32:03 UTC) #3
benrg
tfarina, thanks for looking at this. http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h File ui/views/controls/textfield/textfield.h (right): http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h#newcode69 ui/views/controls/textfield/textfield.h:69: return style() & ...
9 years ago (2011-11-30 19:54:23 UTC) #4
benrg
Oshima, bryeung suggested you could review this.
9 years ago (2011-11-30 21:29:25 UTC) #5
oshima
+bryeung,penghuang Whether or no this is right thing depends on IME/VK's behavior, but my guess ...
9 years ago (2011-12-01 22:08:22 UTC) #6
benrg
http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h File ui/views/controls/textfield/textfield.h (right): http://codereview.chromium.org/8748001/diff/5/ui/views/controls/textfield/textfield.h#newcode69 ui/views/controls/textfield/textfield.h:69: return style() & STYLE_PASSWORD; On 2011/12/01 22:08:22, oshima wrote: ...
9 years ago (2011-12-01 23:36:16 UTC) #7
bryeung
I agree with Oshima's note. IsPassword on the textfield is not synonymous with a text ...
9 years ago (2011-12-02 16:22:28 UTC) #8
Peng
Yes. We use TextInputType to control virtual keyboard visibility, and we also disable IME, if ...
9 years ago (2011-12-02 16:52:32 UTC) #9
oshima
On 2011/12/02 16:22:28, bryeung wrote: > I agree with Oshima's note. IsPassword on the textfield ...
9 years ago (2011-12-02 18:01:40 UTC) #10
benrg
I just talked with Oshima and he said that SetPassword shouldn't set the text input ...
9 years ago (2011-12-02 18:21:41 UTC) #11
oshima
On 2011/12/02 18:21:41, benrg wrote: > I just talked with Oshima and he said that ...
9 years ago (2011-12-02 18:30:49 UTC) #12
benrg
The changes are now implemented. I called it "obscured", but "hidden" is fine with me ...
9 years ago (2011-12-02 22:45:44 UTC) #13
oshima
On 2011/12/02 22:45:44, benrg wrote: > The changes are now implemented. I called it "obscured", ...
9 years ago (2011-12-02 23:33:23 UTC) #14
benrg
PTAL. http://codereview.chromium.org/8748001/diff/25001/ui/views/controls/textfield/textfield.h File ui/views/controls/textfield/textfield.h (right): http://codereview.chromium.org/8748001/diff/25001/ui/views/controls/textfield/textfield.h#newcode58 ui/views/controls/textfield/textfield.h:58: explicit Textfield(StyleFlags style); Is it worth adding TextInputType ...
9 years ago (2011-12-07 19:17:47 UTC) #15
bryeung
Just a couple of comment nits. Though I am a little worried by this I ...
9 years ago (2011-12-07 19:33:14 UTC) #16
benrg
bryeung wrote: >it seems too easy to leak password >data to an IME now (i.e. ...
9 years ago (2011-12-07 21:33:19 UTC) #17
oshima
On Wed, Dec 7, 2011 at 1:33 PM, <benrg@chromium.org> wrote: > bryeung wrote: > >> ...
9 years ago (2011-12-07 21:37:12 UTC) #18
Peng
On 2011/12/07 21:37:12, oshima wrote: > On Wed, Dec 7, 2011 at 1:33 PM, <mailto:benrg@chromium.org> ...
9 years ago (2011-12-08 17:13:56 UTC) #19
oshima
On Thu, Dec 8, 2011 at 9:13 AM, <penghuang@chromium.org> wrote: > On 2011/12/07 21:37:12, oshima ...
9 years ago (2011-12-08 17:40:49 UTC) #20
Peng
On 2011/12/08 17:40:49, oshima wrote: > On Thu, Dec 8, 2011 at 9:13 AM, <mailto:penghuang@chromium.org> ...
9 years ago (2011-12-08 17:51:05 UTC) #21
oshima
On Thu, Dec 8, 2011 at 9:51 AM, <penghuang@chromium.org> wrote: > On 2011/12/08 17:40:49, oshima ...
9 years ago (2011-12-08 18:10:38 UTC) #22
James Su
Just drive by :) On 2011/12/07 21:37:12, oshima wrote: > On Wed, Dec 7, 2011 ...
9 years ago (2011-12-09 01:57:11 UTC) #23
oshima
On Thu, Dec 8, 2011 at 5:57 PM, <suzhe@chromium.org> wrote: > Just drive by :) ...
9 years ago (2011-12-09 03:08:48 UTC) #24
benrg
It's been a while, but everyone who's interested in this PTAL. Because of other checkins ...
8 years, 11 months ago (2012-01-27 21:54:58 UTC) #25
oshima
http://codereview.chromium.org/8748001/diff/50001/ui/views/view_unittest.cc File ui/views/view_unittest.cc (right): http://codereview.chromium.org/8748001/diff/50001/ui/views/view_unittest.cc#newcode969 ui/views/view_unittest.cc:969: password->SetObscured(true); can you add tests in native_textfied_views as well? ...
8 years, 10 months ago (2012-01-30 23:56:23 UTC) #26
oshima
8 years, 10 months ago (2012-01-30 23:56:51 UTC) #27
On 2012/01/30 23:56:23, oshima wrote:
> http://codereview.chromium.org/8748001/diff/50001/ui/views/view_unittest.cc
> File ui/views/view_unittest.cc (right):
> 
>
http://codereview.chromium.org/8748001/diff/50001/ui/views/view_unittest.cc#n...
> ui/views/view_unittest.cc:969: password->SetObscured(true);
> can you add tests in native_textfied_views as well? This is win only and
doesn't
> run on chromeos aura

change looks ok.

Powered by Google App Engine
This is Rietveld 408576698