Bug 51517 - RTL: selection.modify("move", "forward", "line") when cursor is at start of a line does not move down a line
Summary: RTL: selection.modify("move", "forward", "line") when cursor is at start of a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2010-12-22 19:30 PST by Benjamin (Ben) Kalman
Modified: 2012-10-09 12:08 PDT (History)
11 users (show)

See Also:


Attachments
Test case with english text (1.78 KB, text/html)
2010-12-22 19:31 PST, Benjamin (Ben) Kalman
no flags Details
Test case with hebrew text (1.66 KB, text/html)
2010-12-22 19:32 PST, Benjamin (Ben) Kalman
no flags Details
Unskipping test (1.47 KB, patch)
2012-10-03 13:20 PDT, Tullio Lucena
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin (Ben) Kalman 2010-12-22 19:30:47 PST
To reproduce, run the attached test case.  The cursor should be at the end (i.e. right side, since this is RTL) of the 2nd line, but instead is after the 1st character on the /left/ of the 2nd line.  The test can also be reproduced by pressing down (when the cursor is at the rightmost position of the 1st line in the div).

Another observation (probably unrelated): it seems like it's impossible to actually select the start (right) of the text using the mouse, you need to select somewhere else then navigate with arrow keys.

Another observation (probably related): the qt linux build behaves the worst, it isn't even possible to place the cursor on the rightmost position.

A similar bug exists when using hebrew rather than english text, see second attachment, and it seems the behaviour diverges depending on build.
 - chromium linux/mac and gtk: cursor is on the left side of the 1st line
 - qt linux: cursor is after the 1st character on the left side of the 2nd line
Both of which are wrong.
Comment 1 Benjamin (Ben) Kalman 2010-12-22 19:31:44 PST
Created attachment 77298 [details]
Test case with english text
Comment 2 Benjamin (Ben) Kalman 2010-12-22 19:32:14 PST
Created attachment 77299 [details]
Test case with hebrew text
Comment 3 Csaba Osztrogonác 2011-01-24 06:35:45 PST
I removed the "expected fail" and added the failing test to the Qt Skipped file:
http://trac.webkit.org/changeset/76513
Comment 4 WebKit Review Bot 2011-01-24 08:46:33 PST
http://trac.webkit.org/changeset/76513 might have broken GTK Linux 32-bit Debug
The following tests are not passing:
editing/selection/extend-selection-bidi.html
Comment 5 Ádám Kallai 2012-10-03 04:37:01 PDT
Is Anybody working this bug?
Comment 6 Tullio Lucena 2012-10-03 13:20:32 PDT
Created attachment 166949 [details]
Unskipping test

The problem of this test is with Hebrew fonts.
With this change [1] in testfonts, it's passing.

[1] https://gitorious.org/qtwebkit/testfonts/merge_requests/1
Comment 7 WebKit Review Bot 2012-10-09 12:08:15 PDT
Comment on attachment 166949 [details]
Unskipping test

Clearing flags on attachment: 166949

Committed r130787: <http://trac.webkit.org/changeset/130787>
Comment 8 WebKit Review Bot 2012-10-09 12:08:20 PDT
All reviewed patches have been landed.  Closing bug.