[LayoutNG] Make ComputeNGCaretPosition() to work correctly for RTL inline boxes
This patch changes |ComputeNGCaretPosition()| to return valid |NGCaretPosition| for inline boxes in RTL and pass the test[1] for enabling EditnigNG. Before this patch, |ComputeNGCaretPosition()| to return position relative to left of inline box of specified DOM position. Example: <div dir=rtl><bdo id=box1 dir=rtl>ABC</bdo>><bdo id=box2 dir=rtl>DEF</bdo> => ComputeNGCaretPosition("ABC"@3) Before: "DEF"@0 After: "ABC@3" [1] editing/caret/caret-height-multi-line.html Bug: 707656 Change-Id: I785f87ca7b18f05a55bd809b6b390d68dac89c8c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275742 Commit-Queue: Kent Tamura <tkent@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#784259}
Showing
Please register or sign in to comment