New issue
Advanced search Search tips

Issue 906308 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

BiDi movement/selection buggy on Windows

Project Member Reported by pkasting@chromium.org, Nov 17

Issue description

RenderTextTest.MoveLeftRightByWordInBidiText is currently disabled for OS_WIN.  In trying to enable it, I've made some progress, but I'm running into difficulties, and I think some may be bugs in the underlying selection model.

Here's one test case I tried.
(1) Copy the Hebrew letter Resh: ר
(2) Type the following string in the omnibox but paste Resh where you see R: RRR abc RRR abc
(3) Select all and paste that same string into Visual Studio's text editor
(4) Trying using ctrl-left/right with and without shift in the two.  Visual Studio behaves pretty sanely; the omnibox does not.
(a) Example: Place your cursor within the logically second (physically left-hand) group of Reshes.  Repeatedly hit shift-right until selecting into the logically first (physically second) group of "abc".  The selection will select these characters:

 ר
bc ר
c ר
 ר
 abc ר

Clearly we're trying to let the arrow keys move the cursor physically rather than logically, but when the shift key is down and thus the selection is being extended, that's impossible, and the result isn't really logically _or_ physically sane.  By comparison Visual Studio (which also puts the words in a LTR reading order) always has the arrow keys move logically, which makes selection updating sane.
(b) Place the cursor at the left edge of the string.  Hit ctrl-right three times.  Now you're at the logical start of the string, which has completely skipped one of the "abc"s.  Now you can repeatedly hit ctrl-left twice, then ctrl-right once, to get back to the same spot.  Whether left and right are physical or logical, we shouldn't be able to move left two words and right one and be at our starting position.
(c) The omnibox maps home/end to logical cursor positions (start/end of string), which is inconsistent with using arrows for physical movement.

->aleventhal who fixed  bug 196326 , which is connected.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 21

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

commit 1378f210485d7068eab8f8e6964f59bc1e1589cd
Author: Peter Kasting <pkasting@chromium.org>
Date: Wed Nov 21 19:18:46 2018

Re-enable some move-by-word tests on Windows.

This also tries to get closer/improve debuggability for
RenderTextTest.MoveLeftRightByWordInBidiText, which remains disabled.

Bug:  196326 , 906308
Change-Id: I1e9c1217d5ef2e05aa49315de5138c5ad8de0f99
Reviewed-on: https://chromium-review.googlesource.com/c/1343564
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610135}
[modify] https://crrev.com/1378f210485d7068eab8f8e6964f59bc1e1589cd/ui/gfx/render_text_unittest.cc
[modify] https://crrev.com/1378f210485d7068eab8f8e6964f59bc1e1589cd/ui/gfx/selection_model.cc
[modify] https://crrev.com/1378f210485d7068eab8f8e6964f59bc1e1589cd/ui/gfx/selection_model.h

Labels: Hotlist-DesktopUIConsider
Labels: Group-Windows_OS_Integration
Labels: -Hotlist-DesktopUIConsider Hotlist-DesktopUITriaged
Labels: M-73 Target-73

Sign in to add a comment