diff options
author | Yukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-14 01:20:04 +0000 |
---|---|---|
committer | Yukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-14 01:20:04 +0000 |
commit | 14263ebf6b1cdf5ee43aac18ca003af54c709866 (patch) | |
tree | 64ee1dd5923ab3d03b15991a0c6b67bd9b4eedc9 /ui | |
parent | 5523057653e82680e17f15a3b0712129819b0e08 (diff) | |
download | chromium_src-14263ebf6b1cdf5ee43aac18ca003af54c709866.zip chromium_src-14263ebf6b1cdf5ee43aac18ca003af54c709866.tar.gz chromium_src-14263ebf6b1cdf5ee43aac18ca003af54c709866.tar.bz2 |
Use ITfDocumentMgr::GetBase instead of ITfDocumentMgr::GetTop to cancel an on-going composition.
Currently TSFBridgeDelegate::CancelComposition cannot work well against MS-IME 2012 Japanese when it is showing its suggest/candidate window. This patch set fixes such problem.
See the bug page for details.
BUG=169664
TEST=Manually done with --enable-text-services-framework command-line option
Review URL: https://chromiumcodereview.appspot.com/11877010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/ime/win/tsf_bridge.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/base/ime/win/tsf_bridge.cc b/ui/base/ime/win/tsf_bridge.cc index 162f508..18e3a3c 100644 --- a/ui/base/ime/win/tsf_bridge.cc +++ b/ui/base/ime/win/tsf_bridge.cc @@ -228,7 +228,13 @@ bool TSFBridgeDelegate::CancelComposition() { return false; base::win::ScopedComPtr<ITfContext> context; - if (FAILED(document_manager_for_editable_->GetTop(context.Receive()))) { + // We should use ITfDocumentMgr::GetBase instead of ITfDocumentMgr::GetTop, + // which may return a temporal context created by an IME for its modal UI + // handling, to obtain a context against which on-going composition is + // canceled. This is because ITfDocumentMgr::GetBase always returns the + // context that is created by us and owns the on-going composition. + // See http://crbug.com/169664 for details. + if (FAILED(document_manager_for_editable_->GetBase(context.Receive()))) { DVLOG(1) << "Failed to get top context."; return false; } |