From bff1d0746c89a09d1c8c4bcef616eaa2f366f3b2 Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Wed, 3 Feb 1999 02:05:31 +0000 Subject: [PATCH] #2815 "Password text field shows contents in clear-text" --- widget/src/mac/nsTextWidget.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/widget/src/mac/nsTextWidget.cpp b/widget/src/mac/nsTextWidget.cpp index 4f9e2e5e3ead..beb63662fdc8 100644 --- a/widget/src/mac/nsTextWidget.cpp +++ b/widget/src/mac/nsTextWidget.cpp @@ -78,6 +78,21 @@ NS_IMETHODIMP nsTextWidget::Create(nsIWidget *aParent, nsIToolkit *aToolkit, nsWidgetInitData *aInitData) { + if (aInitData) + { + nsTextWidgetInitData* initData = (nsTextWidgetInitData*)aInitData; + if (initData->mIsPassword) + { + SetControlType(kControlEditTextPasswordProc); + mIsPassword = PR_TRUE; + } + else if (mIsReadOnly) + { + SetControlType(kControlStaticTextProc); + mIsReadOnly = PR_TRUE; + } + } + Inherited::Create(aParent, aRect, aHandleEventFunction, aContext, aAppShell, aToolkit, aInitData);