From 8d532e2aac6c71f3256bd28570d7ca65551315b1 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Wed, 10 Jan 2001 14:34:00 +0000 Subject: [PATCH] Removing unneeded code Bug 52279 r=kmcclusk sr=hyatt --- widget/public/nsIKBStateControl.h | 1 - widget/src/gtk/nsWidget.cpp | 7 --- widget/src/gtk/nsWidget.h | 1 - widget/src/mac/nsMacWindow.cpp | 5 -- widget/src/mac/nsMacWindow.h | 1 - widget/src/mac/nsWindow.cpp | 16 ------- widget/src/mac/nsWindow.h | 1 - widget/src/photon/nsWidget.cpp | 8 ---- widget/src/photon/nsWidget.h | 1 - widget/src/qt/nsWidget.cpp | 5 -- widget/src/qt/nsWidget.h | 1 - widget/src/windows/nsDataObj.cpp | 1 - widget/src/windows/nsWindow.cpp | 80 ------------------------------- widget/src/windows/nsWindow.h | 5 -- 14 files changed, 133 deletions(-) diff --git a/widget/public/nsIKBStateControl.h b/widget/public/nsIKBStateControl.h index a6aa1bef796..08d1a0b6616 100644 --- a/widget/public/nsIKBStateControl.h +++ b/widget/public/nsIKBStateControl.h @@ -49,7 +49,6 @@ class nsIKBStateControl : public nsISupports { /* * This method is called in the init stage of a password field */ - NS_IMETHOD PasswordFieldInit()=0; }; diff --git a/widget/src/gtk/nsWidget.cpp b/widget/src/gtk/nsWidget.cpp index 0168425757a..1485734da30 100644 --- a/widget/src/gtk/nsWidget.cpp +++ b/widget/src/gtk/nsWidget.cpp @@ -2587,13 +2587,6 @@ NS_IMETHODIMP nsWidget::ResetInputState() #endif // USE_XIM return NS_OK; } -NS_IMETHODIMP nsWidget::PasswordFieldInit() -{ -#ifdef USE_XIM - mIMEEnable = PR_FALSE; -#endif // USE_XIM - return NS_OK; -} #ifdef USE_XIM void diff --git a/widget/src/gtk/nsWidget.h b/widget/src/gtk/nsWidget.h index ab8718c58a8..76862325a0c 100644 --- a/widget/src/gtk/nsWidget.h +++ b/widget/src/gtk/nsWidget.h @@ -163,7 +163,6 @@ public: // nsIKBStateControl NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull); diff --git a/widget/src/mac/nsMacWindow.cpp b/widget/src/mac/nsMacWindow.cpp index 1c36ee654d2..e48abe70493 100644 --- a/widget/src/mac/nsMacWindow.cpp +++ b/widget/src/mac/nsMacWindow.cpp @@ -970,11 +970,6 @@ NS_IMETHODIMP nsMacWindow::ResetInputState() { return mMacEventHandler->ResetInputState(); } -NS_IMETHODIMP nsMacWindow::PasswordFieldInit() -{ - // to be implemented - return NS_OK; -} void nsMacWindow::SetIsActive(PRBool aActive) { diff --git a/widget/src/mac/nsMacWindow.h b/widget/src/mac/nsMacWindow.h index 8470427eadb..2994bb735c7 100644 --- a/widget/src/mac/nsMacWindow.h +++ b/widget/src/mac/nsMacWindow.h @@ -104,7 +104,6 @@ public: // nsIKBStateControl interface NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); void MoveToGlobalPoint(PRInt32 aX, PRInt32 aY); diff --git a/widget/src/mac/nsWindow.cpp b/widget/src/mac/nsWindow.cpp index e072a3410fb..5ad4b13f6b1 100644 --- a/widget/src/mac/nsWindow.cpp +++ b/widget/src/mac/nsWindow.cpp @@ -2233,22 +2233,6 @@ NS_IMETHODIMP nsWindow::ResetInputState() } return NS_ERROR_ABORT; } -NS_IMETHODIMP nsWindow::PasswordFieldInit() -{ - // currently, the nsMacEventHandler is owned by nsMacWindow, which is the top level window - // we deletgate this call to it's parent - nsCOMPtr parent = getter_AddRefs(GetParent()); - NS_ASSERTION(parent, "cannot get parent"); - if(parent) - { - nsCOMPtr kb = do_QueryInterface(parent); - NS_ASSERTION(kb, "cannot get parent"); - if(kb) { - return kb->PasswordFieldInit(); - } - } - return NS_ERROR_ABORT; -} #if !TARGET_CARBON diff --git a/widget/src/mac/nsWindow.h b/widget/src/mac/nsWindow.h index a5098819a8d..3af23c715e7 100644 --- a/widget/src/mac/nsWindow.h +++ b/widget/src/mac/nsWindow.h @@ -170,7 +170,6 @@ public: public: // nsIKBStateControl interface NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); protected: diff --git a/widget/src/photon/nsWidget.cpp b/widget/src/photon/nsWidget.cpp index 04d651f32d6..4802e71c557 100644 --- a/widget/src/photon/nsWidget.cpp +++ b/widget/src/photon/nsWidget.cpp @@ -303,14 +303,6 @@ NS_IMETHODIMP nsWidget::ResetInputState() return res; } -NS_IMETHODIMP nsWidget::PasswordFieldInit() -{ - // to be implemented - PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWidget::PasswordFieldInit - Not Implemented this=<%p>\n", this)); - - return NS_OK; -} - //------------------------------------------------------------------------- // // Hide or show this component diff --git a/widget/src/photon/nsWidget.h b/widget/src/photon/nsWidget.h index ed76b780591..49f6b57d890 100644 --- a/widget/src/photon/nsWidget.h +++ b/widget/src/photon/nsWidget.h @@ -146,7 +146,6 @@ public: // nsIKBStateControl NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull); diff --git a/widget/src/qt/nsWidget.cpp b/widget/src/qt/nsWidget.cpp index bd34602f832..01add1cc8c8 100644 --- a/widget/src/qt/nsWidget.cpp +++ b/widget/src/qt/nsWidget.cpp @@ -1453,11 +1453,6 @@ NS_IMETHODIMP nsWidget::ResetInputState() return NS_OK; } -NS_IMETHODIMP nsWidget::PasswordFieldInit() -{ - return NS_OK; -} - void nsWidget::AddChildEventHandler(nsQEventHandler *aEHandler) { mChildEventHandlers.insert((void*)aEHandler,aEHandler); diff --git a/widget/src/qt/nsWidget.h b/widget/src/qt/nsWidget.h index 53c9d0cc9e7..fc09ead8be6 100644 --- a/widget/src/qt/nsWidget.h +++ b/widget/src/qt/nsWidget.h @@ -138,7 +138,6 @@ public: // nsIKBStateControl NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); void InitEvent(nsGUIEvent& event, PRUint32 aEventType, diff --git a/widget/src/windows/nsDataObj.cpp b/widget/src/windows/nsDataObj.cpp index 2c9bc4c4120..6d97feb9486 100644 --- a/widget/src/windows/nsDataObj.cpp +++ b/widget/src/windows/nsDataObj.cpp @@ -146,7 +146,6 @@ BOOL nsDataObj::FormatsMatch(const FORMATETC& source, const FORMATETC& target) c //----------------------------------------------------- STDMETHODIMP nsDataObj::GetData(LPFORMATETC pFE, LPSTGMEDIUM pSTM) { - printf("nsDataObj::GetData2\n"); PRNTDEBUG("nsDataObj::GetData\n"); PRNTDEBUG3(" format: %d Text: %d\n", pFE->cfFormat, CF_TEXT); if ( !mTransferable ) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index b3e57e44b0e..d9778405d3b 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -799,27 +799,6 @@ BOOL nsWindow::SetNSWindowPtr(HWND aWnd, nsWindow * ptr) { } } -PRBool -nsWindow::IsScrollbar(HWND aWnd) { - - // Make sure this is one of our windows by comparing the window procedures - LONG proc = ::GetWindowLong(aWnd, GWL_WNDPROC); - if (proc == (LONG)&nsWindow::WindowProc) { - // It is a one of our windows. - nsWindow *someWindow = GetNSWindowPtr(aWnd); - //This is inefficient, but this method is only called when - //a popup window has been displayed, and your clicking within it. - //The default window class begins with Netscape so comparing with the initial - //S in SCROLLBAR will cause strcmp to immediately return. - if (strcmp(someWindow->WindowClass(),"SCROLLBAR") == 0) { - return PR_TRUE; - } - } - - return PR_FALSE; -} - - // // DealWithPopups // @@ -5122,65 +5101,6 @@ void nsWindow::GetCompositionWindowPos(HIMC hIMC, PRUint32 aEventType, COMPOSITI #endif - -NS_IMETHODIMP nsWindow::PasswordFieldInit() -{ -#ifdef DEBUG_KBSTATE - printf("PasswordFieldInit\n"); -#endif - return NS_OK; -} -NS_IMETHODIMP nsWindow::PasswordFieldEnter(PRUint32& oState) -{ -#ifdef DEBUG_KBSTATE - printf("PasswordFieldEnter\n"); -#endif - if(IS_IME_CODEPAGE(gCurrentKeyboardCP)) - { - HIMC hIMC; - NS_IMM_GETCONTEXT(mWnd, hIMC); - if(hIMC) { - DWORD st1,st2; - - BOOL ret = FALSE; - NS_IMM_GETCONVERSIONSTATUS(hIMC, &st1, &st2, ret); - NS_ASSERTION(ret, "ImmGetConversionStatus failed"); - if(ret) { - oState = st1; - NS_IMM_SETCONVERSIONSTATUS(hIMC, IME_CMODE_NOCONVERSION, st2, ret); - NS_ASSERTION(ret, "ImmSetConversionStatus failed"); - } - NS_IMM_RELEASECONTEXT(mWnd, hIMC); - } - } - return NS_OK; -} - -NS_IMETHODIMP nsWindow::PasswordFieldExit(PRUint32 aState) -{ -#ifdef DEBUG_KBSTATE - printf("PasswordFieldExit\n"); -#endif - if(IS_IME_CODEPAGE(gCurrentKeyboardCP)) - { - HIMC hIMC; - NS_IMM_GETCONTEXT(mWnd, hIMC); - if(hIMC) { - DWORD st1,st2; - - BOOL ret = FALSE; - NS_IMM_GETCONVERSIONSTATUS(hIMC, &st1, &st2, ret); - NS_ASSERTION(ret, "ImmGetConversionStatus failed"); - if(ret) { - NS_IMM_SETCONVERSIONSTATUS(hIMC, (DWORD)aState, st2, ret); - NS_ASSERTION(ret, "ImmSetConversionStatus failed"); - } - NS_IMM_RELEASECONTEXT(mWnd, hIMC); - } - } - return NS_OK; -} - // Pick some random timer ID. Is there a better way? #define NS_FLASH_TIMER_ID 0x011231984 diff --git a/widget/src/windows/nsWindow.h b/widget/src/windows/nsWindow.h index 0ab15832aa7..b412b15eaea 100644 --- a/widget/src/windows/nsWindow.h +++ b/widget/src/windows/nsWindow.h @@ -275,7 +275,6 @@ public: // nsIKBStateControl interface NS_IMETHOD ResetInputState(); - NS_IMETHOD PasswordFieldInit(); HWND mBorderlessParent; @@ -297,7 +296,6 @@ protected: static BOOL DealWithPopups ( UINT inMsg, LRESULT* outResult ) ; - static PRBool IsScrollbar(HWND aWnd); static PRBool EventIsInsideWindow(nsWindow* aWindow); static nsWindow * GetNSWindowPtr(HWND aWnd); @@ -366,9 +364,6 @@ protected: void HandleEndComposition(void); void MapDBCSAtrributeArrayToUnicodeOffsets(PRUint32* textRangeListLengthResult, nsTextRangeArray* textRangeListResult); - NS_IMETHOD PasswordFieldEnter(PRUint32& oSavedState); - NS_IMETHOD PasswordFieldExit(PRUint32 aRestoredState); - void ConstrainZLevel(HWND *aAfter); private: