зеркало из https://github.com/mozilla/pjs.git
Removing unneeded code
Bug 52279 r=kmcclusk sr=hyatt
This commit is contained in:
Родитель
94df9a7e68
Коммит
8d532e2aac
|
@ -49,7 +49,6 @@ class nsIKBStateControl : public nsISupports {
|
||||||
/*
|
/*
|
||||||
* This method is called in the init stage of a password field
|
* This method is called in the init stage of a password field
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD PasswordFieldInit()=0;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2587,13 +2587,6 @@ NS_IMETHODIMP nsWidget::ResetInputState()
|
||||||
#endif // USE_XIM
|
#endif // USE_XIM
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP nsWidget::PasswordFieldInit()
|
|
||||||
{
|
|
||||||
#ifdef USE_XIM
|
|
||||||
mIMEEnable = PR_FALSE;
|
|
||||||
#endif // USE_XIM
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USE_XIM
|
#ifdef USE_XIM
|
||||||
void
|
void
|
||||||
|
|
|
@ -163,7 +163,6 @@ public:
|
||||||
|
|
||||||
// nsIKBStateControl
|
// nsIKBStateControl
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull);
|
void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull);
|
||||||
|
|
||||||
|
|
|
@ -970,11 +970,6 @@ NS_IMETHODIMP nsMacWindow::ResetInputState()
|
||||||
{
|
{
|
||||||
return mMacEventHandler->ResetInputState();
|
return mMacEventHandler->ResetInputState();
|
||||||
}
|
}
|
||||||
NS_IMETHODIMP nsMacWindow::PasswordFieldInit()
|
|
||||||
{
|
|
||||||
// to be implemented
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsMacWindow::SetIsActive(PRBool aActive)
|
void nsMacWindow::SetIsActive(PRBool aActive)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,6 @@ public:
|
||||||
|
|
||||||
// nsIKBStateControl interface
|
// nsIKBStateControl interface
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
void MoveToGlobalPoint(PRInt32 aX, PRInt32 aY);
|
void MoveToGlobalPoint(PRInt32 aX, PRInt32 aY);
|
||||||
|
|
||||||
|
|
|
@ -2233,22 +2233,6 @@ NS_IMETHODIMP nsWindow::ResetInputState()
|
||||||
}
|
}
|
||||||
return NS_ERROR_ABORT;
|
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<nsIWidget> parent = getter_AddRefs(GetParent());
|
|
||||||
NS_ASSERTION(parent, "cannot get parent");
|
|
||||||
if(parent)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIKBStateControl> kb = do_QueryInterface(parent);
|
|
||||||
NS_ASSERTION(kb, "cannot get parent");
|
|
||||||
if(kb) {
|
|
||||||
return kb->PasswordFieldInit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NS_ERROR_ABORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
|
|
|
@ -170,7 +170,6 @@ public:
|
||||||
public:
|
public:
|
||||||
// nsIKBStateControl interface
|
// nsIKBStateControl interface
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -303,14 +303,6 @@ NS_IMETHODIMP nsWidget::ResetInputState()
|
||||||
return res;
|
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
|
// Hide or show this component
|
||||||
|
|
|
@ -146,7 +146,6 @@ public:
|
||||||
|
|
||||||
// nsIKBStateControl
|
// nsIKBStateControl
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull);
|
void InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint = nsnull);
|
||||||
|
|
||||||
|
|
|
@ -1453,11 +1453,6 @@ NS_IMETHODIMP nsWidget::ResetInputState()
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsWidget::PasswordFieldInit()
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsWidget::AddChildEventHandler(nsQEventHandler *aEHandler)
|
void nsWidget::AddChildEventHandler(nsQEventHandler *aEHandler)
|
||||||
{
|
{
|
||||||
mChildEventHandlers.insert((void*)aEHandler,aEHandler);
|
mChildEventHandlers.insert((void*)aEHandler,aEHandler);
|
||||||
|
|
|
@ -138,7 +138,6 @@ public:
|
||||||
|
|
||||||
// nsIKBStateControl
|
// nsIKBStateControl
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
void InitEvent(nsGUIEvent& event,
|
void InitEvent(nsGUIEvent& event,
|
||||||
PRUint32 aEventType,
|
PRUint32 aEventType,
|
||||||
|
|
|
@ -146,7 +146,6 @@ BOOL nsDataObj::FormatsMatch(const FORMATETC& source, const FORMATETC& target) c
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
STDMETHODIMP nsDataObj::GetData(LPFORMATETC pFE, LPSTGMEDIUM pSTM)
|
STDMETHODIMP nsDataObj::GetData(LPFORMATETC pFE, LPSTGMEDIUM pSTM)
|
||||||
{
|
{
|
||||||
printf("nsDataObj::GetData2\n");
|
|
||||||
PRNTDEBUG("nsDataObj::GetData\n");
|
PRNTDEBUG("nsDataObj::GetData\n");
|
||||||
PRNTDEBUG3(" format: %d Text: %d\n", pFE->cfFormat, CF_TEXT);
|
PRNTDEBUG3(" format: %d Text: %d\n", pFE->cfFormat, CF_TEXT);
|
||||||
if ( !mTransferable )
|
if ( !mTransferable )
|
||||||
|
|
|
@ -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
|
// DealWithPopups
|
||||||
//
|
//
|
||||||
|
@ -5122,65 +5101,6 @@ void nsWindow::GetCompositionWindowPos(HIMC hIMC, PRUint32 aEventType, COMPOSITI
|
||||||
|
|
||||||
#endif
|
#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?
|
// Pick some random timer ID. Is there a better way?
|
||||||
#define NS_FLASH_TIMER_ID 0x011231984
|
#define NS_FLASH_TIMER_ID 0x011231984
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,6 @@ public:
|
||||||
// nsIKBStateControl interface
|
// nsIKBStateControl interface
|
||||||
|
|
||||||
NS_IMETHOD ResetInputState();
|
NS_IMETHOD ResetInputState();
|
||||||
NS_IMETHOD PasswordFieldInit();
|
|
||||||
|
|
||||||
HWND mBorderlessParent;
|
HWND mBorderlessParent;
|
||||||
|
|
||||||
|
@ -297,7 +296,6 @@ protected:
|
||||||
|
|
||||||
static BOOL DealWithPopups ( UINT inMsg, LRESULT* outResult ) ;
|
static BOOL DealWithPopups ( UINT inMsg, LRESULT* outResult ) ;
|
||||||
|
|
||||||
static PRBool IsScrollbar(HWND aWnd);
|
|
||||||
static PRBool EventIsInsideWindow(nsWindow* aWindow);
|
static PRBool EventIsInsideWindow(nsWindow* aWindow);
|
||||||
|
|
||||||
static nsWindow * GetNSWindowPtr(HWND aWnd);
|
static nsWindow * GetNSWindowPtr(HWND aWnd);
|
||||||
|
@ -366,9 +364,6 @@ protected:
|
||||||
void HandleEndComposition(void);
|
void HandleEndComposition(void);
|
||||||
void MapDBCSAtrributeArrayToUnicodeOffsets(PRUint32* textRangeListLengthResult, nsTextRangeArray* textRangeListResult);
|
void MapDBCSAtrributeArrayToUnicodeOffsets(PRUint32* textRangeListLengthResult, nsTextRangeArray* textRangeListResult);
|
||||||
|
|
||||||
NS_IMETHOD PasswordFieldEnter(PRUint32& oSavedState);
|
|
||||||
NS_IMETHOD PasswordFieldExit(PRUint32 aRestoredState);
|
|
||||||
|
|
||||||
void ConstrainZLevel(HWND *aAfter);
|
void ConstrainZLevel(HWND *aAfter);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче