зеркало из https://github.com/mozilla/gecko-dev.git
Bug 801989 part.4 Set InputContext::mNativeIMEContext on Mac r=smichaud
This commit is contained in:
Родитель
1825df8ec9
Коммит
fd84f5d65b
|
@ -1613,6 +1613,13 @@ nsChildView::GetInputContext()
|
|||
mInputContext.mIMEState.mOpen = IMEState::CLOSED;
|
||||
break;
|
||||
}
|
||||
mInputContext.mNativeIMEContext = [mView inputContext];
|
||||
// If input context isn't available on this widget, we should set |this|
|
||||
// instead of nullptr since nullptr means that the platform has only one
|
||||
// context per process.
|
||||
if (!mInputContext.mNativeIMEContext) {
|
||||
mInputContext.mNativeIMEContext = this;
|
||||
}
|
||||
return mInputContext;
|
||||
}
|
||||
|
||||
|
|
|
@ -294,6 +294,16 @@ public:
|
|||
}
|
||||
NS_IMETHOD_(InputContext) GetInputContext()
|
||||
{
|
||||
NSView* view = mWindow ? [mWindow contentView] : nil;
|
||||
if (view) {
|
||||
mInputContext.mNativeIMEContext = [view inputContext];
|
||||
}
|
||||
// If inputContext isn't available on this window, returns this window's
|
||||
// pointer since nullptr means the platform has only one context per
|
||||
// process.
|
||||
if (!mInputContext.mNativeIMEContext) {
|
||||
mInputContext.mNativeIMEContext = this;
|
||||
}
|
||||
return mInputContext;
|
||||
}
|
||||
NS_IMETHOD BeginSecureKeyboardInput();
|
||||
|
|
Загрузка…
Ссылка в новой задаче