From d2f7d56bd62cd8d6a8e50b25dac8f2bc4871eafe Mon Sep 17 00:00:00 2001 From: "mnissler@chromium.org" Date: Fri, 2 Jul 2010 14:55:09 +0000 Subject: Revert r51526 (Auto-size the views version of the options dialog.) Unexpected unit_tests crash on chromeos. TBR: mnissler git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51529 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/widget_gtk.cc | 14 -------------- views/widget/widget_gtk.h | 1 - 2 files changed, 15 deletions(-) (limited to 'views/widget') diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index c9144d7..1e73e38 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -500,8 +500,6 @@ void WidgetGtk::Init(GtkWidget* parent, GDK_KEY_RELEASE_MASK); SetRootViewForWidget(widget_, root_view_.get()); - g_signal_connect_after(G_OBJECT(window_contents_), "size_request", - G_CALLBACK(&OnSizeRequestThunk), this); g_signal_connect_after(G_OBJECT(window_contents_), "size_allocate", G_CALLBACK(&OnSizeAllocateThunk), this); gtk_widget_set_app_paintable(window_contents_, true); @@ -885,18 +883,6 @@ int WidgetGtk::GetFlagsForEventButton(const GdkEventButton& event) { return flags; } -void WidgetGtk::OnSizeRequest(GtkWidget* widget, GtkRequisition* requisition) { - // Do only return the preferred size for child windows. GtkWindow interprets - // the requisition as a minimum size for top level windows, returning a - // preferred size for these would prevents us from setting smaller window - // sizes. - if (type_ == TYPE_CHILD) { - gfx::Size size(root_view_->GetPreferredSize()); - requisition->width = size.width(); - requisition->height = size.height(); - } -} - void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { // See comment next to size_ as to why we do this. Also note, it's tempting // to put this in the static method so subclasses don't need to worry about diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 3700aa3..816a263 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -223,7 +223,6 @@ class WidgetGtk // Event handlers: CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnButtonPress, GdkEventButton*); - CHROMEGTK_CALLBACK_1(WidgetGtk, void, OnSizeRequest, GtkRequisition*); CHROMEGTK_CALLBACK_1(WidgetGtk, void, OnSizeAllocate, GtkAllocation*); CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnPaint, GdkEventExpose*); CHROMEGTK_CALLBACK_4(WidgetGtk, void, OnDragDataGet, -- cgit v1.1