summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/ime/win/tsf_bridge.cc8
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;
}