Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Issue 19738: review request: fix_5926 (Closed)

Created:
11 years, 10 months ago by xji
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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] Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=9129

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 5

Patch Set 4 : '' #

Total comments: 7

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -19 lines) Patch
M chrome/browser/dom_ui/new_tab_ui.cc View 1 2 3 4 5 5 chunks +34 lines, -13 lines 0 comments Download
M chrome/browser/resources/new_tab.html View 1 2 3 4 5 9 chunks +30 lines, -6 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
xji
11 years, 10 months ago (2009-01-31 01:34:05 UTC) #1
jeremy
lgtm w/some minor nits. http://codereview.chromium.org/19738/diff/1/3 File chrome/browser/dom_ui/new_tab_ui.cc (right): http://codereview.chromium.org/19738/diff/1/3#newcode134 Line 134: // title of http://msdn.microsoft.com/en-us/default.aspx ...
11 years, 10 months ago (2009-01-31 05:28:02 UTC) #2
xji
On 2009/01/31 05:28:02, jeremy wrote: > lgtm > > w/some minor nits. > > http://codereview.chromium.org/19738/diff/1/3 ...
11 years, 10 months ago (2009-01-31 07:06:55 UTC) #3
idana
LGTM, but I have a few nit comments/questions. Also, once everyone else LGTM the change, ...
11 years, 10 months ago (2009-02-01 02:16:27 UTC) #4
xji
On 2009/02/01 02:16:27, idana wrote: > LGTM, but I have a few nit comments/questions. > ...
11 years, 10 months ago (2009-02-02 18:44:03 UTC) #5
xji
Hi Tim, Idan suggested that I ask you for the code review for the RTL ...
11 years, 10 months ago (2009-02-02 18:47:24 UTC) #6
idana
LGTM (just a few more nit comments) http://codereview.chromium.org/19738/diff/207/15 File chrome/browser/dom_ui/new_tab_ui.cc (right): http://codereview.chromium.org/19738/diff/207/15#newcode135 Line 135: // ...
11 years, 10 months ago (2009-02-03 06:48:21 UTC) #7
Glen Murphy
LGTM, one nit. http://codereview.chromium.org/19738/diff/207/14 File chrome/browser/resources/new_tab.html (right): http://codereview.chromium.org/19738/diff/207/14#newcode684 Line 684: */ This comment block needs ...
11 years, 10 months ago (2009-02-03 21:30:45 UTC) #8
xji
changed all of them per suggestion. Thanks for the review, Xiaomei On 2009/02/03 06:48:21, idana ...
11 years, 10 months ago (2009-02-03 23:43:22 UTC) #9
xji
On 2009/02/03 21:30:45, Glen Murphy wrote: > LGTM, one nit. > > http://codereview.chromium.org/19738/diff/207/14 > File ...
11 years, 10 months ago (2009-02-03 23:43:57 UTC) #10
tim (not reviewing)
http://codereview.chromium.org/19738/diff/207/14 File chrome/browser/resources/new_tab.html (right): http://codereview.chromium.org/19738/diff/207/14#newcode515 Line 515: <div class="thumbnail-title" style="background-image:url(faviconurl);direction:ltr">gmail.com</div> nit- you could put the ...
11 years, 10 months ago (2009-02-04 01:15:21 UTC) #11
tim (not reviewing)
On 2009/02/04 01:15:21, timsteele wrote: > http://codereview.chromium.org/19738/diff/207/14 > File chrome/browser/resources/new_tab.html (right): > > http://codereview.chromium.org/19738/diff/207/14#newcode515 > ...
11 years, 10 months ago (2009-02-04 01:15:39 UTC) #12
xji
11 years, 10 months ago (2009-02-04 02:25:27 UTC) #13
On 2009/02/04 01:15:21, timsteele wrote:
> http://codereview.chromium.org/19738/diff/207/14
> File chrome/browser/resources/new_tab.html (right):
> 
> http://codereview.chromium.org/19738/diff/207/14#newcode515
> Line 515: <div class="thumbnail-title"
> style="background-image:url(faviconurl);direction:ltr">gmail.com</div>
> nit- you could put the style attribute on the line below the class. that's
all!

Done.
Thanks for the review!

Xiaomei

Powered by Google App Engine
This is Rietveld 408576698