Index: chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc |
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc |
index 65083d5530250a6b391c619ba73eebbc79b32dd8..2934bbc08acce3415a0c58760b8b7e205e88d155 100644 |
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc |
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc |
@@ -135,14 +135,17 @@ gboolean OnDragIconExpose(GtkWidget* sender, |
cairo_paint(cr); |
cairo_destroy(cr); |
+ GtkAllocation allocation; |
+ gtk_widget_get_allocation(sender, &allocation); |
+ |
// Paint the title text. |
gfx::CanvasSkiaPaint canvas(event, false); |
int text_x = gdk_pixbuf_get_width(data->favicon) + kBarButtonPadding; |
- int text_width = sender->allocation.width - text_x; |
+ int text_width = allocation.width - text_x; |
ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); |
canvas.DrawStringInt(data->text, base_font, data->text_color, |
- text_x, 0, text_width, sender->allocation.height); |
+ text_x, 0, text_width, allocation.height); |
return TRUE; |
} |