Bug 23457

Summary: RTL: Weird behavior when trying to select Hebrew text
Product: WebKit Reporter: Jeremy Moskovich <playmobil>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: hbono, mitz, progame+wk, xji
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
URL: http://www.local.co.il/raanana/7392/articles.htm
Attachments:
Description Flags
Screenshot
none
Reduction
none
Screenshot
none
Reduced test case none

Description Jeremy Moskovich 2009-01-21 09:37:38 PST
Checked on Browser:
FF 3: OK
IE: OK
Safari 3.12/WebKit nightly: Error

The problem is that it's very tricky to select the 2nd and third line of the title text on this page.

Selecting the whole paragraph containing the tile shows these two lines with a "stronger selection" as if the selection is drawn twice.

From the original bug report:
"try selecting the big purple title of this page (&#1514;&#1511;&#1510;&#1497;&#1489; &#1506;&#1497;&#1512;&#1497;&#1497;&#1514; &#1512;&#1506;&#1504;&#1504;&#1492; &#1500;&#1513;&#1504;&#1514; 2009 -  516
&#1502;&#1497;&#1500;&#1497;&#1493;&#1503; &#1513;&#1511;&#1500;&#1497;&#1501;) - it's only big in chrome btw
http://www.local.co.il/raanana/7392/articles.htm
it's all plain text
but line 2 and 3 (&#1514;&#1511;&#1510;&#1497;&#1489; &#1506;&#1497;&#1512;&#1497;&#1497;&#1514; &#1512;&#1506;&#1504;&#1504;&#1492; &#1500;&#1513;&#1504;&#1514; 2009 ) are almost impossible to select
it can only be selected as a whole as if it is a picture
and cannot be copied to the clipboard

it works just fine in IE, and that title is also a lot smaller in IE"
Comment 1 Jeremy Moskovich 2009-01-21 09:38:18 PST
Created attachment 26895 [details]
Screenshot
Comment 2 Jeremy Moskovich 2009-01-21 09:38:56 PST
Original report: http://code.google.com/p/chromium/issues/detail?id=6135#c6
Comment 3 Jeremy Moskovich 2009-01-22 16:52:23 PST
Created attachment 26947 [details]
Reduction
Comment 4 Yair Yogev 2009-03-27 06:32:24 PDT
the reduction posted doesn't show the bug

the original page at http://www.local.co.il/raanana/7392/articles.htm still does though
Comment 5 Yair Yogev 2009-05-14 04:00:03 PDT
this is not only a mac issue of course
Comment 6 mitz 2009-05-14 07:59:51 PDT
(In reply to comment #5)
> this is not only a mac issue of course
> 

A good way to indicate this is to set the OS field to "All".  
Comment 7 Yair Yogev 2010-02-19 01:38:17 PST
seems to be fixed
i can reproduce the issue using an old version of WebKit but not on the latest ones
Comment 8 Jeremy Moskovich 2010-03-07 09:16:42 PST
I can still see some weirdness in the latest WebKit nightly, although the symptoms are different than before.

Update steps to reproduce:
* Open the attached reduction and change the Text Encoding to Hebrew (Windows)
* Drag down from the top to just below the 2nd line so the first and second line are both completely selected.
* Drag up a bit and move the selection slowly in the gap between "2009" and the first Hebrew word.

Actual result:
Note that the color of "2009" changes while the selection background color behaves correctly.

Expected result:
The color of "2009" should stay the same as the rest of the text.
Comment 9 Jeremy Moskovich 2010-03-07 09:21:12 PST
Created attachment 50174 [details]
Screenshot
Comment 10 Yair Yogev 2010-03-07 09:56:17 PST
is it reproducible under windows too?
Comment 11 Jeremy Moskovich 2011-03-29 08:00:03 PDT
Created attachment 87330 [details]
Reduced test case
Comment 12 Jeremy Moskovich 2011-03-29 08:32:48 PDT
Looks like the errant drawing is happening in RootInlineBox::lineSelectionGap() .