Also in Radar as:
<rdar://problem/4036353> RTL: arrow keys move insertion bar backwards in RTL text
Easy to reproduce by typing in some Hebrew text, and then using the arrow keys. You'll move forward/
back through the document rather than left/right through the visible text.
My patch in bug 3710 has some relevant related changes, so it might be good to fix that bug first.
Raising to P1 since this causes a regression with the new text fields.
These are all text field regressions so they should all be P1.
Here's one of the relatively simple cases that I just don't know how to solve (uppercase letters are RTL):
It is laid out as
The primary caret positions, from left to right, should be:
div.text div.text div.text div.text span.text span.text span.text div.text div.text span.text
That last step, from div.text to span.text is the tricky one, and so is recognizing that span.text is a rightmost position.
There is also a variant where there is another text node after the span, but that text node wraps to the next line.
Created attachment 10786 [details]
Here's an unfinished patch written a while back by an Apple Engineer.
Fixed in <http://trac.webkit.org/changeset/32605>.
*** Bug 20612 has been marked as a duplicate of this bug. ***