Comment #8 on issue 5926 by [email protected]: RTL: Text in [New Tab]
should be truncated from RightToLeft instead of LeftToRight
http://code.google.com/p/chromium/issues/detail?id=5926
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=9129
------------------------------------------------------------------------
r9129 | [email protected] | 2009-02-03 22:33:55 -0800 (Tue, 03 Feb 2009) |
36 lines
Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/dom_ui/new_tab_ui.cc?r1=9129&r2=9128
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/new_tab.html?r1=9129&r2=9128
This change list fix issue 5926 -- RTL: Text in [New Tab] should be
truncated from RightToLeft instead of LeftToRight.
(http://crbug.com/5926)
Basically, the issue is that in RTL locales, the thumbnail title etc. text
will always be truncated from left, even if they are pure English. For
example, "mail.yahoo.com" whose title is "Yahoo! the best web based email!"
will be truncated to "best web-based email!".
We should be able to truncate the title as "Yahoo! the be...".
The fix is to set the direction style of each title in the [New Tab] html
page for title to be displayed and truncated correctly.
The fix consists 2 part: new_tab_ui.cc in backend and new_tab.html in
frontend.
1. new_tab_ui.cc
For thumbnail title, recent bookmark title, and recently closed tab titles,
originally, we set "title" and "url" into the data we pass to JS in
new_tab.html. The fix added the title's "direction" to the data. The
direction is by default "ltr" and is set as "rtl" when there is character
having strong directionality in the title.
2. new_tab.html
2.1 set text-alignment in thumbnail-title, bookmark container, and recently
closed container to be "right" for RTL locales.
2.2 explicitly set title's directionality in the above 3 sections.
Test:
1. open Chrome in RTL locales.
2. open the following pages:
http://yahoo.com
http://gmail.com
http://mail.yahoo.com
http://wikipedia.com
http://msdn.microsoft.com/en-us/default.aspx
http://arabic.arabia.msn.com/default.aspx
http://he.wikipedia.org/
3. bookmark, close some of them.
4. open [New Tab]
Review URL: http://codereview.chromium.org/19738
------------------------------------------------------------------------
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---