diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-11 17:37:23 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-11 17:37:23 +0000 |
commit | dc6623e242ee481766daa29c64c82fda4e0cf52a (patch) | |
tree | 9c74fd94f96c8387d25e0e3f396cb1bdb13328bb /app/gfx | |
parent | 954e197dc36dbf70ea5793060f847b2660c17b00 (diff) | |
download | chromium_src-dc6623e242ee481766daa29c64c82fda4e0cf52a.zip chromium_src-dc6623e242ee481766daa29c64c82fda4e0cf52a.tar.gz chromium_src-dc6623e242ee481766daa29c64c82fda4e0cf52a.tar.bz2 |
Attempt to fix text not being clipped. This only seems to happen in
certain configurations. I'm guessing the problem is because a
width/height <= 0 is not honored and clipping doesn't happen.
BUG=26483
TEST=none
Review URL: http://codereview.chromium.org/542011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rwxr-xr-x | app/gfx/canvas_linux.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc index 2b427a8..a0f7e0d 100755 --- a/app/gfx/canvas_linux.cc +++ b/app/gfx/canvas_linux.cc @@ -206,6 +206,9 @@ void Canvas::DrawStringInt(const std::wstring& text, const SkColor& color, int x, int y, int w, int h, int flags) { + if (w <= 0 || h <= 0) + return; + cairo_t* cr = beginPlatformPaint(); PangoLayout* layout = pango_cairo_create_layout(cr); |