commit | 1c21e1e431d9b9c6da1f8d9769b02b09ae5bd16c | [log] [tgz] |
---|---|---|
author | Darren Shen <shend@chromium.org> | Thu May 11 00:03:39 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 11 00:03:39 2023 |
tree | 9915563e1f5dffa556bb8172cc3a7a93e218c21c | |
parent | 9dcd81d402f9d583b2dcf94878537005e3a56a95 [diff] |
inputs: Introduce ExtendSelectionAndReplace/ReplaceSurroundingText API. ChromeOS has a common operation of "replace some existing text around the cursor with some new text". This is used in autocorrection, grammar check, longpress diacritics etc. This is currently accomplished by doing ExtendSelectionAndDelete (aka DeleteSurroundingText), followed by a InsertText (aka CommitText). There are two problems with this: 1) Because it's not atomic, users may see a brief flash. 2) Some websites do not support ExtendSelectionAndDelete correctly. Introduce a new ExtendSelectionAndReplace/ReplaceSurroundingText API that can be used by longpress diacritics on ChromeOS. Blink already supports this operation for Mac, and we can fallback to the two separate operations for other clients. Bug: b/279670207,1443726 Change-Id: I797fcd83d4df972ac8828cae31faa9e6c3dc2543 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4485920 Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/main@{#1142491}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.