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

Unified Diff: ui/views/controls/textfield/native_textfield_win.cc

Issue 8748001: Make text input type and password visibility bit independent in Textfield (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move IsPassword() back to .cc Created 9 years, 1 month 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
Index: ui/views/controls/textfield/native_textfield_win.cc
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc
index fcc782b4a212b57ef1cbfe1a10c7c8ad59a89615..b12e28d7ddf0b2717b6f1a6af6833c3cad0511ce 100644
--- a/ui/views/controls/textfield/native_textfield_win.cc
+++ b/ui/views/controls/textfield/native_textfield_win.cc
@@ -100,7 +100,7 @@ NativeTextfieldWin::NativeTextfieldWin(Textfield* textfield)
did_load_library_ = !!LoadLibrary(L"riched20.dll");
DWORD style = kDefaultEditStyle | ES_AUTOHSCROLL;
- if (textfield_->style() & Textfield::STYLE_PASSWORD)
+ if (textfield_->IsPassword())
style |= ES_PASSWORD;
if (textfield_->read_only())
@@ -113,7 +113,7 @@ NativeTextfieldWin::NativeTextfieldWin(Textfield* textfield)
Create(textfield_->GetWidget()->GetNativeView(), r, NULL, style, ex_style);
if (textfield_->style() & Textfield::STYLE_LOWERCASE) {
- DCHECK((textfield_->style() & Textfield::STYLE_PASSWORD) == 0);
+ DCHECK(!textfield_->IsPassword());
SetEditStyle(SES_LOWERCASE, SES_LOWERCASE);
}

Powered by Google App Engine
This is Rietveld 408576698