commit | a6dadbcc9839a6888be4f5f554ab9e953c621d16 | [log] [tgz] |
---|---|---|
author | Yoshifumi Inoue <yosin@chromium.org> | Fri Oct 30 00:59:33 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Oct 30 00:59:33 2020 |
tree | 4ea2e830aa6d677b4ee441adc55a4f46cf3ddb2b | |
parent | b4a697e36b1613bc9e30c8650d7d5a833ce6597d [diff] |
Make InputMethodController::GetImeTextSpansAroundPosition() to take Position This patch changes |GetImeTextSpansAroundPosition()| to take |Position| instead of offset in root editable element to avoid using |PalinTextRange|, to avoid redundant calculation for improving performance. Note: Even if this change, large content editable is still slow due by |PlainTextRange| uses |TextIterator| to collect text from root editable element and map DOM position to offset for every frame or 16ms. For every frame, we call * InputMethodController::TextInputInfo() - PlainText() for root editable elements - TextIterator for end of selection - TextIterator for end of composition * InputMethodController::GetSelectionOffsets() - TextIterator for end of selection Mapping time depends of number of DOM node between start of root editable and position. When selection or IME composition are far from start of root editable element, mapping takes time. Bug: 892513 Change-Id: Id2f6694e3fee2b23b697a1aaf1830cd0d897d61a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2507129 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#822460}
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.
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.