зеркало из https://github.com/mozilla/gecko-dev.git
Bug 810225 part.3 Replace NSInputManager in IMEInputHandler::DiscardIMEComposition() with NSTextInputContext r=smichaund
This commit is contained in:
Родитель
ec93050f7e
Коммит
32f72bab00
|
@ -2352,17 +2352,11 @@ IMEInputHandler::DiscardIMEComposition()
|
|||
return;
|
||||
}
|
||||
|
||||
NSInputManager* im = [NSInputManager currentInputManager];
|
||||
if (!im) {
|
||||
// retry
|
||||
mPendingMethods |= kDiscardIMEComposition;
|
||||
NS_WARNING("Application is active but there is no currentInputManager");
|
||||
ResetTimer();
|
||||
return;
|
||||
}
|
||||
|
||||
NS_ENSURE_TRUE_VOID(mView);
|
||||
NSTextInputContext* inputContext = [mView inputContext];
|
||||
NS_ENSURE_TRUE_VOID(inputContext);
|
||||
mIgnoreIMECommit = true;
|
||||
[im markedTextAbandoned: mView];
|
||||
[inputContext discardMarkedText];
|
||||
mIgnoreIMECommit = false;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK
|
||||
|
|
Загрузка…
Ссылка в новой задаче