New issue
Advanced search Search tips

Issue 883044 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
RTL



Sign in to add a comment

Can't set caret after collapsed whitespace in RTL text

Project Member Reported by xiaoche...@chromium.org, Sep 11

Issue description

Chrome Version: M69 Stable & M71 ToT
OS: Linux

What steps will reproduce the problem?
(1) Load http://jsfiddle.net/xiaochengh/9novd2cx/
(2) Click at the left side of the space
(3) Observe

What is the expected result?

Caret should appear right under the mouse click location

What happens instead?

Caret appears at somewhere else

Please use labels and text to provide additional information.

If this is a regression (i.e., worked before), please consider using the
bisect tool (https://www.chromium.org/developers/bisect-builds-py) to help
us identify the root cause and more rapidly triage the issue.

For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1de9f3f139721513bf4a015e9c386a7713fd956a

commit 1de9f3f139721513bf4a015e9c386a7713fd956a
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Sep 12 14:16:39 2018

Fix a bug in ComputeInlineBoxPosition when searching ahead

ComputeInlineBoxPosition has a "search ahead for better match" fixup
that is supposed to do the following:

"When the input position is downstream and visually at the end of a text
node, search for a better text box in the next text node."

However, the implementation is hacky and considers LTR text only.

This patch makes it slightly saner on pure RTL text.

Note: this patch doesn't clean up all issues with the fixup. We may need
to rewrite it after thorough consideration about bidi.

Bug:  883044 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I3a74ac3616d05b4abed45a47ac3d15623f647a89
Reviewed-on: https://chromium-review.googlesource.com/1220689
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590665}
[modify] https://crrev.com/1de9f3f139721513bf4a015e9c386a7713fd956a/third_party/blink/renderer/core/editing/inline_box_position.cc
[modify] https://crrev.com/1de9f3f139721513bf4a015e9c386a7713fd956a/third_party/blink/renderer/core/editing/local_caret_rect_test.cc

Status: Fixed (was: Assigned)

Sign in to add a comment