Bug 14684 - Hebrew text in Safari chrome is reversed (LTR instead of RTL)
Summary: Hebrew text in Safari chrome is reversed (LTR instead of RTL)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 14626
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-20 00:08 PDT by mitz
Modified: 2007-07-24 02:59 PDT (History)
1 user (show)

See Also:


Attachments
Test case (228 bytes, text/html)
2007-07-20 00:11 PDT, mitz
no flags Details
More bidi string rendering tests (and bugs) (1.25 KB, text/html)
2007-07-20 16:21 PDT, mitz
no flags Details
[WIP] Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls (25.25 KB, patch)
2007-07-21 05:54 PDT, mitz
no flags Details | Formatted Diff | Diff
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls (355.44 KB, patch)
2007-07-22 07:01 PDT, mitz
darin: review+
Details | Formatted Diff | Diff
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls (353.53 KB, patch)
2007-07-23 10:25 PDT, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-07-20 00:08:41 PDT
Hebrew text in Safari chrome is laid out in left-to-right order instead of right-to-left. This can be seen in window title bars, bookmark menu items, and the address bar and search fields when they are not focused.
Comment 1 mitz 2007-07-20 00:11:37 PDT
Created attachment 15591 [details]
Test case
Comment 2 mitz 2007-07-20 00:12:07 PDT
Also affected are link drag images and tab titles.
Comment 3 Adam Roben (:aroben) 2007-07-20 00:34:24 PDT
<rdar://problem/5267753>
Comment 4 mitz 2007-07-20 16:21:31 PDT
Created attachment 15610 [details]
More bidi string rendering tests (and bugs)

Reordering characters is not enough, as demonstrated by the way list items render on this test: mirroring and combining marks need to be handled. Since the Font object already knows how to do that for unidirectional runs, I think the bidirectional string drawing routine should not reorder characters and feed one string into Font::drawText, but rather draw separate truly-unidirectional runs.
Comment 5 mitz 2007-07-21 05:54:45 PDT
Created attachment 15611 [details]
[WIP] Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls
Comment 6 mitz 2007-07-22 07:01:07 PDT
Created attachment 15620 [details]
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls
Comment 7 Darin Adler 2007-07-22 08:44:15 PDT
Comment on attachment 15620 [details]
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls

r=me

I would like the change log to explain better why the visual ordering test cases are removed. I think I understand, but I'm not sure.
Comment 8 Adam Roben (:aroben) 2007-07-22 12:23:52 PDT
Comment on attachment 15620 [details]
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls

Index: WebCore/manual-tests/resources/chrome-bidi-text-window.html
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: WebCore/manual-tests/resources/chrome-bidi-text-window.html
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


I don't think this was intentional? Whoever commits this should fix this first!
Comment 9 mitz 2007-07-22 12:47:14 PDT
(In reply to comment #8)
> I don't think this was intentional? Whoever commits this should fix this first!

That file is encoded as UTF-16. I think it is more readable that way than using entities for all the non-Latin characters.
Comment 10 mitz 2007-07-23 10:25:03 PDT
Created attachment 15650 [details]
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls

Changed the manual test case to UTF-8 and added info to the change log about why -webkit-rtl-ordering:visual is being ignored.
Comment 11 Darin Adler 2007-07-23 10:29:06 PDT
Comment on attachment 15650 [details]
Add GraphicsContext::drawBidiText() and use it in WebCoreTextRenderer.cpp and in form controls

r=me
Comment 12 Mark Rowe (bdash) 2007-07-24 02:59:08 PDT
Landed in r24582.