Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6818)

Unified Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 8921022: GTK: Even more cleanup to access allocation through the accessor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_gtk.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b9aff92fb6305d550ff4f2ceb7d311f2248000d..d419dd54cfe1278590562d0b6a16c48b63424553 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -99,9 +99,13 @@ gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent,
GtkWidget* widget) {
gfx::Point parent_pos = gtk_util::GetWidgetScreenPosition(parent);
gfx::Point widget_pos = gtk_util::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(),
- widget->allocation.width, widget->allocation.height);
+ allocation.width, allocation.height);
}
} // namespace
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_gtk.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698