summaryrefslogtreecommitdiffstats
path: root/app/gfx
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 17:37:23 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 17:37:23 +0000
commitdc6623e242ee481766daa29c64c82fda4e0cf52a (patch)
tree9c74fd94f96c8387d25e0e3f396cb1bdb13328bb /app/gfx
parent954e197dc36dbf70ea5793060f847b2660c17b00 (diff)
downloadchromium_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-xapp/gfx/canvas_linux.cc3
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);