Bug 1138678 - Ignore NOTIFY_IME_OF_BLUR when establishing secure input mode. r=masayuki

SetInputContext keeps proper tabs on the secure input setting.  This
code could result in improper IME configuration.

--HG--
extra : rebase_source : 431cb629ca2321776fcc4c73635739f037729605
This commit is contained in:
David Parks 2015-03-18 19:08:22 -07:00
Родитель 6649eea3cd
Коммит be65e7c4e3
2 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -1601,10 +1601,6 @@ nsChildView::NotifyIMEInternal(const IMENotification& aIMENotification)
mTextInputHandler->OnFocusChangeInGecko(true);
return NS_OK;
case NOTIFY_IME_OF_BLUR:
// When we're going to be deactive, we must disable the secure event input
// mode, see the Carbon Event Manager Reference.
TextInputHandler::EnsureSecureEventInputDisabled();
NS_ENSURE_TRUE(mTextInputHandler, NS_ERROR_NOT_AVAILABLE);
mTextInputHandler->OnFocusChangeInGecko(false);
return NS_OK;
@ -5503,6 +5499,8 @@ static int32_t RoundUp(double aDouble)
nsIWidgetListener* listener = mGeckoChild->GetWidgetListener();
if (listener)
listener->WindowDeactivated();
TextInputHandler::EnsureSecureEventInputDisabled();
}
// If the call to removeFromSuperview isn't delayed from nsChildView::

Просмотреть файл

@ -2124,9 +2124,6 @@ nsCocoaWindow::NotifyIMEInternal(const IMENotification& aIMENotification)
}
return NS_OK;
case NOTIFY_IME_OF_BLUR:
// When we're going to be deactive, we must disable the secure event input
// mode, see the Carbon Event Manager Reference.
TextInputHandler::EnsureSecureEventInputDisabled();
return NS_OK;
default:
return NS_ERROR_NOT_IMPLEMENTED;
@ -2401,6 +2398,8 @@ nsCocoaWindow::ExecuteNativeKeyBinding(NativeKeyBindingsType aType,
if ([window isSheet])
[WindowDelegate paintMenubarForWindow:[NSApp mainWindow]];
TextInputHandler::EnsureSecureEventInputDisabled();
NS_OBJC_END_TRY_ABORT_BLOCK;
}