[Webkit-unassigned] [Bug 25298] Ctrl + Right/Left arrow move forward/backward through document instead of right/left in RTL text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 18:05:53 PDT 2010


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





--- Comment #10 from Xiaomei Ji <xji at chromium.org>  2010-06-01 18:05:52 PST ---

> 
> Given the following example:
> <div contenteditable dir=rtl>abc ששש def <span dir=ltr>שנב  abc סטז</span>  uvw זזז xyz</div> 
> 
> ctrl-left-arrow does not work correctly when caret is around the Hebrew characters inside the <span>.
> 
> The position information in some of the positions inside <span> looks like a bug to me, which caused the ctrl-left-arrow does not move correctly.
> 
> Below, I am using "(node, offset)a" to represent the node and offset information of position when caret is before character "a". 
> 
> Assume "שנב abc  סטז" is node A and "abc ששש def " is node B.
> 
> (A, 3)ב(A, 2)נ(A, 1)ש(B, 0xc) (A, 4)a(A, 6)b(A, 7)c(A, 8) (A, 0xc)ז(A, 0xB)ט(A, 0xa)ס(A, 9).
> 
> The position information (B, 0xc) looks like a bug. position (A, 4) or (A, 6) looks like a bug too (why (A, 5) is missing?).

(A, 5) is the 2nd space before "abc" within span.

> 
> The above node has 4 runs, their (start, length) are (0, 3), (3, 1), (5, 4), and (9, 3).
> The information (5, 4) looks like a bug. Why it starts at 5, which is not continuous with previous run?

It is because of the 2 contiguous spaces before "abc" within span.

The patch does not work in all cases. The way to compute character offset inside InlineBox to VisiblePosition is wrong. It's based on the assumption that   offset of VisiblePosition for all positions in an InlineBox are continuous, which is not true for the above example.

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


More information about the webkit-unassigned mailing list