From dec17db9e227f3b1b25aeebab8d7fdf2da220fde Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Thu, 8 Oct 1998 15:23:03 +0000 Subject: [PATCH] Fixed ref count problem git-svn-id: svn://10.0.0.236/trunk@12282 18797224-902f-48f8-a5cc-f745e15eee43 --- .../widget/src/windows/nsTextAreaWidget.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mozilla/widget/src/windows/nsTextAreaWidget.cpp b/mozilla/widget/src/windows/nsTextAreaWidget.cpp index 6b0405cc66a..4ba54508b5b 100644 --- a/mozilla/widget/src/windows/nsTextAreaWidget.cpp +++ b/mozilla/widget/src/windows/nsTextAreaWidget.cpp @@ -22,7 +22,7 @@ #include "nsString.h" #include -NS_IMPL_ADDREF(nsTextAreaWidget) +/*NS_IMPL_ADDREF(nsTextAreaWidget) //NS_IMPL_RELEASE(nsTextAreaWidget) nsrefcnt nsTextAreaWidget::Release(void) { @@ -32,18 +32,10 @@ nsrefcnt nsTextAreaWidget::Release(void) return 0; } return mRefCnt; -} - - -//------------------------------------------------------------------------- -void nsTextAreaWidget::SetUpForPaint(HDC aHDC) -{ - NS_INIT_REFCNT(); - ::SetBkColor (aHDC, NSRGB_2_COLOREF(mBackground)); - ::SetTextColor(aHDC, NSRGB_2_COLOREF(mForeground)); - //::SetBkMode (aHDC, TRANSPARENT); // don't do this -} +}*/ +NS_IMPL_ADDREF(nsTextAreaWidget) +NS_IMPL_RELEASE(nsTextAreaWidget) //------------------------------------------------------------------------- // @@ -52,6 +44,7 @@ void nsTextAreaWidget::SetUpForPaint(HDC aHDC) //------------------------------------------------------------------------- nsTextAreaWidget::nsTextAreaWidget() { + NS_INIT_REFCNT(); nsTextHelper::mBackground = NS_RGB(124, 124, 124); } @@ -64,6 +57,13 @@ nsTextAreaWidget::~nsTextAreaWidget() { } +//------------------------------------------------------------------------- +void nsTextAreaWidget::SetUpForPaint(HDC aHDC) +{ + ::SetBkColor (aHDC, NSRGB_2_COLOREF(mBackground)); + ::SetTextColor(aHDC, NSRGB_2_COLOREF(mForeground)); + //::SetBkMode (aHDC, TRANSPARENT); // don't do this +} //------------------------------------------------------------------------- //