New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 135058 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

Incorrect painting of LTR tab title in RTL Chrome

Project Member Reported by asvitk...@chromium.org, Jun 28 2012

Issue description

Open a RTL Chrome instance (e.g. via --lang=he) and go to amazon.com.

The tab title text should be drawn LTR and truncate-faded at the right end.

Currently, this is not the case and the tab title is drawn with right alignment and truncated at the left (but faded on the right).

The issue is base_tab.cc calls DrawStringInt() without specifying a text direction on Linux, which uses DefaultCanvasTextAlignment() which defaults to the UI alignment (RTL).
 
Actually, after http://crrev.com/144791, the fade and truncation are now on the same (incorrect) end, rather than on different ends.

We just need to pass the correct alignment flags to DrawStringInt() in base_tab.cc to fix this.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 4 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=145432

------------------------------------------------------------------------
r145432 | asvitkine@chromium.org | Tue Jul 03 21:40:39 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/ui/gfx/canvas_skia.cc?r1=145432&r2=145431&pathrev=145432
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/views/tabs/base_tab.cc?r1=145432&r2=145431&pathrev=145432
 M http://src.chromium.org/viewvc/chrome/trunk/src/ui/gfx/canvas.h?r1=145432&r2=145431&pathrev=145432

Fix eliding of LTR tab title in RTL UI under non-Windows Views.

Use DrawFadeTruncatingString() on non-Windows views platforms too, now
that the implementation is no longer platform specific.

BUG= 135058 
TEST=Launch chromeos chrome with --lang=he and go to amazon.com.
Check that the tab title is painted LTR and elided (via fade
truncation) on the right end. Now, go to google.com. Verify
that the "Google" string is right-aligned in the tab title.
TBR=sky@chromium.org,xji@chromium.org
R=msw@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10701024
------------------------------------------------------------------------
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 4 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=145435

------------------------------------------------------------------------
r145435 | asvitkine@chromium.org | Tue Jul 03 23:13:06 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/ui/gfx/canvas_skia.cc?r1=145435&r2=145434&pathrev=145435

Fix default alignment of drawn text when no alignment flags are passed.

This corresponds to logic in canvas_win.cc at the top of ComputeFormatFlags().

BUG= 135639 , 135058 
TEST=Open chrome.exe --lang=he and go to the NTP. Tab title should be right aligned. In the same instance, go to www.google.com. The text "Google" should also be right aligned. There should be no changes in LTR UI.

Review URL: https://chromiumcodereview.appspot.com/10703075
------------------------------------------------------------------------
Status: Fixed
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 10 2012

Labels: merge-merged-1132
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=145917

------------------------------------------------------------------------
r145917 | asvitkine@chromium.org | Tue Jul 10 11:09:29 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/branches/1132/src/ui/gfx/canvas_skia.cc?r1=145917&r2=145916&pathrev=145917

Merge 145435 - Fix default alignment of drawn text when no alignment flags are passed.

This corresponds to logic in canvas_win.cc at the top of ComputeFormatFlags().

BUG= 135639 , 135058 
TEST=Open chrome.exe --lang=he and go to the NTP. Tab title should be right aligned. In the same instance, go to www.google.com. The text "Google" should also be right aligned. There should be no changes in LTR UI.

Review URL: https://chromiumcodereview.appspot.com/10703075

TBR=asvitkine@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10700143
------------------------------------------------------------------------
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 10 2012

Labels: merge-merged-1180
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=145941

------------------------------------------------------------------------
r145941 | asvitkine@chromium.org | Tue Jul 10 12:58:12 PDT 2012

Changed paths:
 M http://src.chromium.org/viewvc/chrome/branches/1180/src/ui/gfx/canvas_skia.cc?r1=145941&r2=145940&pathrev=145941

Merge 145435 - Fix default alignment of drawn text when no alignment flags are passed.

This corresponds to logic in canvas_win.cc at the top of ComputeFormatFlags().

BUG= 135639 , 135058 
TEST=Open chrome.exe --lang=he and go to the NTP. Tab title should be right aligned. In the same instance, go to www.google.com. The text "Google" should also be right aligned. There should be no changes in LTR UI.

Review URL: https://chromiumcodereview.appspot.com/10703075

TBR=asvitkine@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10703128
------------------------------------------------------------------------
Status: Verified
Google Chrome	22.0.1215.0 dev
Platform	2655.0.0 dev-channel
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-UI -Mstone-22 M-22 Cr-UI
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 14 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Sign in to add a comment