[Webkit-unassigned] [Bug 24168] RTL: Home/End key does not behave correctly in mixed bidi text in RTL document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 4 15:08:29 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=24168





------- Comment #3 from xji at chromium.org  2009-03-04 15:08 PDT -------
I investigated a bit on this bug. Following is my finding. Please correct me if
I mis-understood anything.

Given the following bidi text (in visual order) in RTL textbox:
"def FED 123 CBA abc", in which, lower case letter are LTR text, and upper case
letter are RTL text.

The position of the characters (with dummy_RTL added at the begin and end of
the line) in the line is:
dummy_RTL(20)d(18)e(19)f(17) (16)F(15)E(14)D(13) (12)1(10)2(11)
3(9) (8)C(7)B(6)A(5) (4)a(2)b(3)c(1)dummy_RTL, in which, the number after the
character is the visible position in the line.

The InlineBidiResolver constructs bidi runs in visual order.
The node list of the above line is: (def)( FED )(123)( CBA )(abc), in which the
node (def) is the first leaf node, and node (abc) is the last node.

node (def) starts at position 17 and ends at position 20.
in "static VisiblePosition startPositionForLine", start position of line is the
start position of the start node of the line, that is why 17 is returned, and
the cursor is at the (visual) position after 'f' when HOME key is pressed.

Similarly, end position of line is the end position of the last node of the
line, that is why 4 is returned, and the cursor is at the (visual) position
before 'a' when END key is pressed.

Similar for text "IHG def FED xyz CBA", cursor is visually before 'd' when HOME
is pressed, and it is afer 'z' when END is pressed.

Since HOME/END key are logical keys, I am wondering should we use logical node
order? so that the first node is "abc" and the last node is "def"? Then, where
is the logical node order saved?

Or in static VisiblePosition startPositionForLine(), we can simply check
whether the line is in RTL environment, and use the start position of *last*
node as the start position of the line if it is in RTL environment.  


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list