summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 00:06:55 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 00:06:55 +0000
commitfc2d3fced2e685464564407b14e57077cad3250e (patch)
treea1be44530c15ab1d92a238719b0409099cee003b
parent205b526ffd207ee8d07d91ce2ec8eb522ac8b024 (diff)
downloadchromium_src-fc2d3fced2e685464564407b14e57077cad3250e.zip
chromium_src-fc2d3fced2e685464564407b14e57077cad3250e.tar.gz
chromium_src-fc2d3fced2e685464564407b14e57077cad3250e.tar.bz2
Linux: Don't vertically tile the frame background.
BUG=21728 Review URL: http://codereview.chromium.org/203060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26185 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 20d1570..01f2194 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -656,13 +656,16 @@ gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget,
}
CairoCachedSurface* surface = theme_provider->GetSurfaceNamed(
image_name, widget);
- surface->SetSource(cr,
- 0,
- window->UseCustomFrame() ? 0 : -kCustomFrameBackgroundVerticalOffset);
- cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
- cairo_rectangle(cr, event->area.x, event->area.y,
- event->area.width, event->area.height);
- cairo_fill(cr);
+ if (event->area.y < surface->Height()) {
+ surface->SetSource(cr,
+ 0,
+ window->UseCustomFrame() ? 0 : -kCustomFrameBackgroundVerticalOffset);
+ // The frame background isn't tiled vertically.
+ cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
+ cairo_rectangle(cr, event->area.x, event->area.y,
+ event->area.width, surface->Height() - event->area.y);
+ cairo_fill(cr);
+ }
if (theme_provider->HasCustomImage(IDR_THEME_FRAME_OVERLAY)) {
CairoCachedSurface* theme_overlay = theme_provider->GetSurfaceNamed(