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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc

Issue 2768006: Test + Fix for GTK window resizing when using toolkit views. (Closed)
Patch Set: Return a gfx::Size instead. Created 10 years, 4 months 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/views/html_dialog_view_browsertest.cc ('k') | chrome/browser/views/tabs/dragged_tab_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
index e8265cbb9dfa55c4da08fd3ad0368bde3857f6e7..c2616003b0123cf018bd791ee9501bc977b5ec1f 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -213,14 +213,13 @@ gfx::NativeWindow TabContentsViewGtk::GetTopLevelNativeWindow() const {
}
void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const {
- GetBounds(out, false);
-
// Callers expect the requested bounds not the actual bounds. For example,
// during init callers expect 0x0, but Gtk layout enforces a min size of 1x1.
- GtkRequisition requisition;
- gtk_widget_get_child_requisition(GetNativeView(), &requisition);
- out->set_width(requisition.width);
- out->set_height(requisition.height);
+ GetBounds(out, false);
+
+ gfx::Size size;
+ WidgetGtk::GetRequestedSize(&size);
+ out->set_size(size);
}
void TabContentsViewGtk::StartDragging(const WebDropData& drop_data,
« no previous file with comments | « chrome/browser/views/html_dialog_view_browsertest.cc ('k') | chrome/browser/views/tabs/dragged_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698