Bug 840409 part.6 Implement widget::IMEHandler::NotifyIME() for committing and canceling composition r=jimm, feedback=roc

This commit is contained in:
Masayuki Nakano
2013-02-25 13:00:06 +09:00
parent e8d25344c1
commit 06f68bb034
4 changed files with 46 additions and 21 deletions

View File

@@ -7384,16 +7384,7 @@ nsWindow::OnSysColorChanged()
NS_IMETHODIMP nsWindow::ResetInputState()
{
#ifdef DEBUG_KBSTATE
PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ("ResetInputState\n"));
#endif
#ifdef NS_ENABLE_TSF
nsTextStore::CommitComposition(false);
#endif //NS_ENABLE_TSF
nsIMM32Handler::CommitComposition(this);
return NS_OK;
return IMEHandler::NotifyIME(this, REQUEST_TO_COMMIT_COMPOSITION);
}
NS_IMETHODIMP_(void)
@@ -7462,16 +7453,7 @@ nsWindow::GetInputContext()
NS_IMETHODIMP nsWindow::CancelIMEComposition()
{
#ifdef DEBUG_KBSTATE
PR_LOG(gWindowsLog, PR_LOG_ALWAYS, ("CancelIMEComposition\n"));
#endif
#ifdef NS_ENABLE_TSF
nsTextStore::CommitComposition(true);
#endif //NS_ENABLE_TSF
nsIMM32Handler::CancelComposition(this);
return NS_OK;
return IMEHandler::NotifyIME(this, REQUEST_TO_CANCEL_COMPOSITION);
}
NS_IMETHODIMP