commit | 0317d4c538d6ad100efcae895532381ceef66356 | [log] [tgz] |
---|---|---|
author | Dan Clark <daniec@microsoft.com> | Wed Jan 24 18:36:13 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 24 18:36:13 2024 |
tree | 2a69fda6fd62dcb222b81156afcf620593fd4991 | |
parent | 09e2fe4b993e2bad4b955c57589f887a42633327 [diff] |
[EditContext] Fix indexing in FirstRectForCharacterRange The `location` parameter to EditContext::FirstRectForCharacterRange is relative to the entire contents of the editable region, but character_bounds_ (if HasValidCompositionBounds() is true) is indexed only relative to the composition range within the editable region. So, when indexing into character_bounds_ we must adjust `location` by the start offset of the editable region. The `length == 0` cases in FirstRectForCharacterRange were failing to do this adjustment when indexing into character_bounds_. Fix the array indexing and add a test. Bug: 1507725 Change-Id: Ie742cfe0c56fb016d70b32b0f13c4d53e94db2d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5219458 Commit-Queue: Dan Clark <daniec@microsoft.com> Reviewed-by: Anupam Snigdha <snianu@microsoft.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1251542}
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.