Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 107357 Inconsistencies between Canvas::DrawStringInt() flags on Linux vs. Windows.
Starred by 3 users Project Member Reported by, Dec 13 2011 Back to list
Status: Fixed
Closed: Oct 2013
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 130001

Sign in to add a comment
I have observed the following inconsistencies of how DrawStringInt() flags are handled between the two platforms:

- On Windows, if MULTI_LINE then the text is always vertically aligned. The flags TEXT_VALIGN_MIDDLE and TEXT_VALIGN_BOTTOM are ignored. On Linux, the text valign flags are correctly applied to multi line text (but see below about MULTI_LINE flag).

- On Linux, the MULTI_LINE flag is ignored. Instead, the flag NO_ELLIPSIS controls this behaviour. If set, text will be rendered as multi line. Otherwise, the text will be rendered with Left h-alignment and eliding will be done via fading. (The last part is an intentional difference.)

This bug is to track work that will consolidate these differences. This will likely be done in conjunction with
Comment 1 by, Feb 29 2012
Labels: -Feature-Views Internals-Views
Summary: Inconsistencies between Canvas::DrawStringInt() flags on Linux vs. Windows. (was: NULL)
Old Summary: Inconsistencies between CanvasSkia::DrawStringInt() flags on Linux vs. Windows
New Summary: Inconsistencies between Canvas::DrawStringInt() flags on Linux vs. Windows.
Blockedon: 130001
Project Member Comment 4 by, Jul 24 2012
The following revision refers to this bug:

r148243 | | 2012-07-24T23:19:07.331586Z

Changed paths:

Remove Linux-specific mapping from NO_ELLIPSIS to MULTI_LINE in

BUG= 107357 ,  133638 
TEST= is fixed and there are no other visual regressions.

Review URL:
Blockedon: -chromium:130001 chromium:130001
Hi Varun,

ui/gfx/ currently has a platform-specific hack to detect if the string passed in contains \n characters and if so, set the gfx::Canvas::MULTI_LINE flag.

It seems that this is only needed for the code in ash/tooltips/ to work correctly. I'd like to remove that hack, would it be possible to adjust the code in to not rely on it?
Project Member Comment 6 by, Mar 10 2013
Labels: -Area-UI -Internals-Views Cr-Internals-Views Cr-UI
Project Member Comment 7 by, Oct 8 2013
r227403 | | 2013-10-08T00:27:32.258479Z

Changed paths:

Remove Linux-specific hack.

This was added because didn't
SetMultiLine() on strings it was drawing. It now
does, so this shouldn't be necessary.

BUG= 107357 
TEST=No functional changes.

Review URL:
Labels: M-32
Status: Fixed
Sign in to add a comment