Open Bug 427824 Opened 13 years ago Updated 5 years ago

Ctrl + Left Arrow moves the caret over two words on bidirectional text


(Core :: Layout: Text and Fonts, defect)

Windows Vista
Not set




(Reporter: nir123, Unassigned)



(Keywords: regression, rtl, testcase)


(1 file)

719 bytes, text/html; charset=Windows-1255
Attached file testcase
Ctrl + Left Arrow should move the caret over one word only.
On bidirectional text, such as Hebrew and English the caret jumps over two words instead of one.

Follow the instructions on the attached testcase to reproduce the bug.

According to Uri Bernstein, this is a regression from bug 367177.
Attachment #314386 - Attachment mime type: text/html → text/html; charset=Windows-1255
Thanks for reporting this, Nir.
Notice that this happens when layout.word_select.eat_space_to_next_word is true, i.e., by default on Windows, but not on Mac or Linux (I think).
Roc, Simon: What I /think/ is going on here is that two ClusterIterators are used - one for the first (RTL) frame (where aDirection==1), and the second for the continuation (LTR) frame (where aDirection=-1).
The context built in the first CI is passed into the second one. The second CI sees that it has context, and assumes this means that there is some *following* content (because it incorrectly assumes that we were going backwards towards this frame when building the context - which is not true). It then also builds a bogus context ("englishHEBREW ") based on the same wrong assumption.

I'm not sure how to fix this (and I certainly don't have time to do it) - so I'm leaving it to you for now.
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: layout.bidi → layout.fonts-and-text
Blocks: 551877
Duplicate of this bug: 551877
We think bug 551877 is a duplicate of this bug, although it might be a slightly different issue.  Once we have a patch for this bug, it would be helpful to check that it also fixes the errant behavior described in bug 551877.
You need to log in before you can comment on or make changes to this bug.