• Siye Liu's avatar
    Use ITfContextOwnerCompositionServices to terminate composition · e95876d6
    Siye Liu authored
    This change aims to demonstrate how we can re-implement the following
    methods in a sane way.
    
     * TSFTextStore::CancelComposition()
     * TSFTextStore::ConfirmComposition()
    
    In our initial implementation [1], those two methods were implemented
    in a really hacky way. It was implemented by simulating a text change
    event during a composition with an assumption that the current IME will
    terminate the composition when it receives |OnTextChange|.
    |ITfContextOwnerCompositionServices::TerminateComposition| should have
    been used instead in this scenario.
    
    [1]: e7888801
    
    Bug: 948783
    Change-Id: Ibfb270d9f8dc2459ca73824c7405f10111e12ad1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1572240
    Commit-Queue: Siye Liu <siliu@microsoft.com>
    Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#652873}
    e95876d6
tsf_text_store.h 16.5 KB