Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 107357 Inconsistencies between Canvas::DrawStringInt() flags on Linux vs. Windows.
Starred by 3 users Project Member Reported by asvitk...@chromium.org, Dec 13 2011 Back to list
Status: Fixed
Owner:
Closed: Oct 2013
Cc:
Components:
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 http://crbug.com/105550
 
Comment 1 by laforge@google.com, 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 bugdroid1@chromium.org, Jul 24 2012
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=148243

------------------------------------------------------------------------
r148243 | asvitkine@chromium.org | 2012-07-24T23:19:07.331586Z

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

Remove Linux-specific mapping from NO_ELLIPSIS to MULTI_LINE in canvas_skia.cc.

BUG= 107357 ,  133638 
TEST=http://crbug.com/133638 is fixed and there are no other visual regressions.

Review URL: https://chromiumcodereview.appspot.com/10808109
------------------------------------------------------------------------
Blockedon: -chromium:130001 chromium:130001
Cc: varunjain@chromium.org
Hi Varun,

ui/gfx/canvas_skia.cc 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/tooltip_controller.cc to work correctly. I'd like to remove that hack, would it be possible to adjust the code in tooltip_controller.cc to not rely on it?
Project Member Comment 6 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-UI -Internals-Views Cr-Internals-Views Cr-UI
Project Member Comment 7 by bugdroid1@chromium.org, Oct 8 2013
------------------------------------------------------------------------
r227403 | asvitkine@chromium.org | 2013-10-08T00:27:32.258479Z

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

Remove Linux-specific canvas_skia.cc hack.

This was added because tooltip_controller.cc 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: https://codereview.chromium.org/26291002
------------------------------------------------------------------------
Labels: M-32
Status: Fixed
Sign in to add a comment