Index: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc |
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc |
index 5c7ed884a8ddd135e1fddadd9037f26d866e5e10..f5dff68a875fa9ac87288eafae5c6debdc039485 100644 |
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc |
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc |
@@ -99,15 +99,9 @@ const int kCloseButtonHorzFuzz = 4; |
// Gets the bounds of |widget| relative to |parent|. |
gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, |
GtkWidget* widget) { |
- gfx::Point parent_pos = ui::GetWidgetScreenPosition(parent); |
- gfx::Point widget_pos = ui::GetWidgetScreenPosition(widget); |
- |
- GtkAllocation allocation; |
- gtk_widget_get_allocation(widget, &allocation); |
- |
- return gfx::Rect(widget_pos.x() - parent_pos.x(), |
- widget_pos.y() - parent_pos.y(), |
- allocation.width, allocation.height); |
+ gfx::Rect bounds = ui::GetWidgetScreenBounds(widget); |
+ bounds.Offset(-ui::GetWidgetScreenOffset(parent)); |
+ return bounds; |
} |
// Returns a GdkPixbuf after resizing the SkBitmap as necessary. Caller must |