1. 16 Jul, 2020 2 commits
    • Siye Liu's avatar
      Fire composition events if composition has been started and completed in same edit session. · 18c770a4
      Siye Liu authored
      Some IMEs may start and complete composition within same edit session.
      Therefore, we should still fire composition events at the moment where
      we commit the text to blink.
      
      This change also contains several refactors:
      1. Refactor code in |CommitTextAndEndCompositionIfAny|.
      
      2. Moves logic to set |new_text_inserted_| from |TSFTextStore::SetText|
      to |TSFTextStore::InsertTextAtSelection| since IMEs may directly invoke
      the latter method. We need to correctly set the |new_text_inserted_|
      flag in order to push text states to blink.
      
      3. |TSFTextStore::InsertTextAtSelection| may be called several times in
      single edit session. Therefore, we need to aggregate all replacement
      ranges into single |replace_text_range_|.
      
      4. In |TSFTextStore::RequestLock|, we should also reset all caches such
      as |new_text_inserted_| even when the function early returns.
      
      5. In |TSFTextStore::RequestLock|, use the replace text end pos instead
      of the cached |composition_start_| as the |new_composition_start|.
      
      Bug: 1099125
      Change-Id: Ibfa2ff284a183939596d9ea2a5e7105e8139b099
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274245Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
      Reviewed-by: default avatarSiye Liu <siliu@microsoft.com>
      Reviewed-by: default avatarAnupam Snigdha <snianu@microsoft.com>
      Commit-Queue: Siye Liu <siliu@microsoft.com>
      Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
      Cr-Commit-Position: refs/heads/master@{#788799}
      18c770a4
    • Martin Kreichgauer's avatar
      fido: do not use CTAP2 in cryptotoken GetAssertion requests · 8f84d7a8
      Martin Kreichgauer authored
      WebAuthn GetAssertion requests originating from the cryptotoken
      extension, which implements Chrome's U2F API, currently may result in a
      CTAP2 request if the selected authenticator supports CTAP2.
      
      This hasn't really caused issues in the past: Lenient authenticators
      accept an appId as the makeCredential request's rp_id parameter and let
      us challenge the U2F credential that way. Or if the authenticator
      indicates over CTAP2 that the credential doesn't exist, GetAssertionTask
      would then automatically retry over the U2F interface based on the
      presence of the appId extension. Responses for both cases are
      equivalent.
      
      But sending CTAP2 GetAssertion requests in order to respond to a request
      to the U2F API is unexpected and inefficient. It may also cause issues
      with future authenticators that decide to treat user verification as
      non-optional for all requests arriving on the CTAP2 interface.
      
      Instead, change GetAssertionTask to never try its CTAP2 path for these
      requests.
      
      Bug: 1099782
      Change-Id: Ice54122bf3b9f63814d594074a39b9b46279ded4
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298541
      Commit-Queue: Martin Kreichgauer <martinkr@google.com>
      Reviewed-by: default avatarAdam Langley <agl@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#788798}
      8f84d7a8
  2. 15 Jul, 2020 38 commits