diff --git a/content/events/src/nsIMEStateManager.cpp b/content/events/src/nsIMEStateManager.cpp index c4772d89fbe8..f02a675dbd17 100644 --- a/content/events/src/nsIMEStateManager.cpp +++ b/content/events/src/nsIMEStateManager.cpp @@ -90,7 +90,6 @@ private: nsIContent* nsIMEStateManager::sContent = nullptr; nsPresContext* nsIMEStateManager::sPresContext = nullptr; bool nsIMEStateManager::sInstalledMenuKeyboardListener = false; -bool nsIMEStateManager::sInSecureInputMode = false; bool nsIMEStateManager::sIsTestingIME = false; nsTextStateManager* nsIMEStateManager::sTextStateObserver = nullptr; @@ -243,29 +242,6 @@ nsIMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext, return NS_OK; } - // Handle secure input mode for password field input. - bool contentIsPassword = false; - if (aContent && aContent->GetNameSpaceID() == kNameSpaceID_XHTML) { - if (aContent->Tag() == nsGkAtoms::input) { - nsAutoString type; - aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type); - contentIsPassword = type.LowerCaseEqualsLiteral("password"); - } - } - if (sInSecureInputMode) { - if (!contentIsPassword) { - if (NS_SUCCEEDED(widget->EndSecureKeyboardInput())) { - sInSecureInputMode = false; - } - } - } else { - if (contentIsPassword) { - if (NS_SUCCEEDED(widget->BeginSecureKeyboardInput())) { - sInSecureInputMode = true; - } - } - } - IMEState newState = GetNewIMEState(aPresContext, aContent); if (!focusActuallyChanging) { // actual focus isn't changing, but if IME enabled state is changing, diff --git a/content/events/src/nsIMEStateManager.h b/content/events/src/nsIMEStateManager.h index d6f20be154ad..9f6bd7c510e6 100644 --- a/content/events/src/nsIMEStateManager.h +++ b/content/events/src/nsIMEStateManager.h @@ -128,7 +128,6 @@ protected: static nsIContent* sContent; static nsPresContext* sPresContext; static bool sInstalledMenuKeyboardListener; - static bool sInSecureInputMode; static bool sIsTestingIME; static nsTextStateManager* sTextStateObserver; diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 7c3b9be26ffb..c2a730ed12a7 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -519,9 +519,6 @@ public: virtual void UpdateThemeGeometries(const nsTArray& aThemeGeometries); - NS_IMETHOD BeginSecureKeyboardInput(); - NS_IMETHOD EndSecureKeyboardInput(); - void HidePlugin(); void UpdatePluginPort(); diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index a6732e6f5d95..71dddf94a0cc 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -2343,34 +2343,6 @@ nsChildView::UpdateThemeGeometries(const nsTArray& aThemeGeometri [win setUnifiedToolbarHeight:DevPixelsToCocoaPoints(devUnifiedHeight)]; } -NS_IMETHODIMP -nsChildView::BeginSecureKeyboardInput() -{ - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - - nsresult rv = nsBaseWidget::BeginSecureKeyboardInput(); - if (NS_SUCCEEDED(rv)) { - ::EnableSecureEventInput(); - } - return rv; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; -} - -NS_IMETHODIMP -nsChildView::EndSecureKeyboardInput() -{ - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - - nsresult rv = nsBaseWidget::EndSecureKeyboardInput(); - if (NS_SUCCEEDED(rv)) { - ::DisableSecureEventInput(); - } - return rv; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; -} - #ifdef ACCESSIBILITY already_AddRefed nsChildView::GetDocumentAccessible() diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h index 483af270d850..4a1918e1f942 100644 --- a/widget/cocoa/nsCocoaWindow.h +++ b/widget/cocoa/nsCocoaWindow.h @@ -316,8 +316,6 @@ public: } return mInputContext; } - NS_IMETHOD BeginSecureKeyboardInput(); - NS_IMETHOD EndSecureKeyboardInput(); void SetPopupWindowLevel(); diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index db873800aec4..8270ac21d8d5 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -2029,32 +2029,6 @@ gfxASurface* nsCocoaWindow::GetThebesSurface() return nullptr; } -NS_IMETHODIMP nsCocoaWindow::BeginSecureKeyboardInput() -{ - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - - nsresult rv = nsBaseWidget::BeginSecureKeyboardInput(); - if (NS_SUCCEEDED(rv)) { - ::EnableSecureEventInput(); - } - return rv; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; -} - -NS_IMETHODIMP nsCocoaWindow::EndSecureKeyboardInput() -{ - NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - - nsresult rv = nsBaseWidget::EndSecureKeyboardInput(); - if (NS_SUCCEEDED(rv)) { - ::DisableSecureEventInput(); - } - return rv; - - NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; -} - void nsCocoaWindow::SetPopupWindowLevel() { if (!mWindow) diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 76edf233d13c..eba0042470ab 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -92,8 +92,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event); #endif #define NS_IWIDGET_IID \ -{ 0xa7d1e8d4, 0xe2c1, 0x45cb, \ - { 0xab, 0x72, 0xb3, 0xe9, 0xf9, 0xcc, 0xb2, 0xce } } +{ 0x5b9152, 0x56c8, 0x4a2d, \ + { 0x94, 0x9e, 0xec, 0xf5, 0x3, 0x83, 0x3d, 0x48 } } /* * Window shadow styles @@ -1310,24 +1310,6 @@ class nsIWidget : public nsISupports { */ virtual bool HasPendingInputEvent() = 0; - /** - * Called when when we need to begin secure keyboard input, such as when a password field - * gets focus. - * - * NOTE: Calls to this method may not be nested and you can only enable secure keyboard input - * for one widget at a time. - */ - NS_IMETHOD BeginSecureKeyboardInput() = 0; - - /** - * Called when when we need to end secure keyboard input, such as when a password field - * loses focus. - * - * NOTE: Calls to this method may not be nested and you can only enable secure keyboard input - * for one widget at a time. - */ - NS_IMETHOD EndSecureKeyboardInput() = 0; - /** * Set the background color of the window titlebar for this widget. On Mac, * for example, this will remove the grey gradient and bottom border and diff --git a/widget/xpwidgets/nsBaseWidget.cpp b/widget/xpwidgets/nsBaseWidget.cpp index 336f059b04c5..ad8b62752b5e 100644 --- a/widget/xpwidgets/nsBaseWidget.cpp +++ b/widget/xpwidgets/nsBaseWidget.cpp @@ -47,7 +47,6 @@ static void debug_RegisterPrefCallbacks(); -static bool debug_InSecureKeyboardInputMode = false; #endif #ifdef NOISY_WIDGET_LEAKS @@ -1172,26 +1171,6 @@ nsBaseWidget::SetIcon(const nsAString&) return NS_OK; } -NS_IMETHODIMP -nsBaseWidget::BeginSecureKeyboardInput() -{ -#ifdef DEBUG - NS_ASSERTION(!debug_InSecureKeyboardInputMode, "Attempting to nest call to BeginSecureKeyboardInput!"); - debug_InSecureKeyboardInputMode = true; -#endif - return NS_OK; -} - -NS_IMETHODIMP -nsBaseWidget::EndSecureKeyboardInput() -{ -#ifdef DEBUG - NS_ASSERTION(debug_InSecureKeyboardInputMode, "Calling EndSecureKeyboardInput when it hasn't been enabled!"); - debug_InSecureKeyboardInputMode = false; -#endif - return NS_OK; -} - NS_IMETHODIMP nsBaseWidget::SetWindowTitlebarColor(nscolor aColor, bool aActive) { diff --git a/widget/xpwidgets/nsBaseWidget.h b/widget/xpwidgets/nsBaseWidget.h index 36e90a73027b..87ff5eedc752 100644 --- a/widget/xpwidgets/nsBaseWidget.h +++ b/widget/xpwidgets/nsBaseWidget.h @@ -148,8 +148,6 @@ public: NS_IMETHOD GetAttention(int32_t aCycleCount); virtual bool HasPendingInputEvent(); NS_IMETHOD SetIcon(const nsAString &anIconSpec); - NS_IMETHOD BeginSecureKeyboardInput(); - NS_IMETHOD EndSecureKeyboardInput(); NS_IMETHOD SetWindowTitlebarColor(nscolor aColor, bool aActive); virtual void SetDrawsInTitlebar(bool aState) {} virtual bool ShowsResizeIndicator(nsIntRect* aResizerRect);