[Webkit-unassigned] [Bug 53696] Caret is rendered at an incorrect position at the boundary of Arabic number in a LTR context

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 18:12:16 PST 2011


--- Comment #19 from Ryosuke Niwa <rniwa at webkit.org>  2011-02-23 18:12:16 PST ---
(In reply to comment #18)
> (In reply to comment #17)
> >  For WebKit, we can't use offset 0 to mean the location between the letters and the numbers because the offset 0 corresponds and only corresponds to the leftmost boundary of the line.
> I don’t understand this explanation (or maybe it’s not an explanation?).

Let me try again.  So in WebKit, we use the convention that the offsets at the boundary of a run follows the direction of the surrounding run.  For example, if we have CBA (RTL text) in a LTR run, then we have offsets as (0)C(2)B(1)A(3) while we have natural (3)C(2)B(1)A(0) if it were to appear in a RTL run.

Now, the text in question is CBAabc.  Since "abc" is inside a RTL run of CBA, offsets at the boundaries follows RTL conventions as in (3)a(1)b(2)c(0).  However, the outer RTL run is in a LTR block, which means offset at the boundary of the RTL run has to follow LTR convention of the outer block hence we have: (0)CBA(3)a(1)b(2)c.  Now because CBA(abc) is a RTL run inside a LTR block, the offsets at its boundary follows LTR convention, resulting in (0)C(5)B(4)A(3)a(1)b(2)c(6).

Does this make sense?  Or am I misunderstanding something?

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