Summary: | REGRESSION (r11783): Hebrew text in list boxes is reversed | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||||
Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Major | Keywords: | HasReduction, InRadar, Regression | ||||||||||
Priority: | P1 | ||||||||||||
Version: | 420+ | ||||||||||||
Hardware: | Mac | ||||||||||||
OS: | OS X 10.4 | ||||||||||||
Attachments: |
|
Description
mitz
2006-12-12 08:26:07 PST
Created attachment 11823 [details]
Test case
Bug 11812 is similar. GraphicsContext::drawText is not suitable for drawing arbitrary strings. (In reply to comment #0) > This bug is a regression from fixing bug 4844 (SVN doesn't seem to have a > revision number for that CVS-era change). It's r11783. (I ran "svn log WebKit/WebCoreSupport" and looked for the bug number in the commit text. :) (In reply to comment #3) > It's r11783. (I ran "svn log WebKit/WebCoreSupport" and looked for the bug > number in the commit text. :) > Thank you! In Radar 4947184 Created attachment 12891 [details]
patch
Comment on attachment 12891 [details]
patch
I'm going to rework this and post a new patch.
Things to address:
-malloc less by using a Vector<UChar>
- don't call bidi algorithm in the directional override case
- If there's one run, and its not reversed, return early
Comment on attachment 12891 [details]
patch
+ TextStyle textStyle(0, 0, 0, style()->direction() == RTL, style()->visuallyOrdered() == true);
Since the characters in the buffer are in LTR visual order (that's the result of bidiReorderCharacters), the flags should always be (..., false, true). This will ensure that ATSUI's own bidi algorithm doesn't kick in. The only exception is that if style()->direction() == RTL and style()->unicodeBidi() == Override, in which case you *may* skip bidiReorderCharacters and use (..., true, true). In the other override cases (LTR+Override or VisuallyOrdered) you skip bidiReorderCharacters and use (..., false, true).
Created attachment 12949 [details]
updated patch
I tried to address Mitz's comments with this patch.
There may be a cleaner way to put the direction override logic though.
Created attachment 12955 [details]
new patch!
Comment on attachment 12955 [details]
new patch!
r=me with one change discussed on IRC. Anders okayed the CharacterBuffer typedef.
Committed revision 19414. |