| Index: chrome/common/gtk_util.cc
|
| diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
|
| index 842b99ab19e8c02487a6d8675b0985d05ffe4793..fac62f491297cacc8dcf42a2195984ec37cb786b 100644
|
| --- a/chrome/common/gtk_util.cc
|
| +++ b/chrome/common/gtk_util.cc
|
| @@ -568,4 +568,13 @@ void StackPopupWindow(GtkWidget* popup, GtkWidget* toplevel) {
|
| }
|
| }
|
|
|
| +gfx::Rect GetWidgetRectRelativeToToplevel(GtkWidget* widget) {
|
| + gint x = 0, y = 0;
|
| + DCHECK(gtk_widget_translate_coordinates(widget,
|
| + gtk_widget_get_toplevel(widget),
|
| + 0, 0,
|
| + &x, &y));
|
| + return gfx::Rect(x, y, widget->allocation.width, widget->allocation.height);
|
| +}
|
| +
|
| } // namespace gtk_util
|
|
|