From 30138a899711b9e075cd73a9e704ce858ecefdd5 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 18 Jun 2009 00:09:09 +0000 Subject: Allow the RenderWidgetHostViewGtk to be sized even if it isn't a popup. browser/views/tab_contents/tab_contents_view_gtk.cc implements sizing in a similar fashion to windows - i.e. when the GtkWidget is resized, it tells the RenderViewHost that it was sized, which causes the RVH to resize the view. A check for if (parent_) in the Gtk RenderWidgetHostView impl was preventing this sizing from occurring. BUG=none TEST=none Review URL: http://codereview.chromium.org/125275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18670 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/renderer_host/render_widget_host_view_gtk.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'chrome/browser/renderer_host') diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 7a55322..73b60c9 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -316,11 +316,20 @@ void RenderWidgetHostViewGtk::SetSize(const gfx::Size& size) { // If we are a popup, we want to handle this. // TODO(estade): are there other situations where we want to respect the // request? +#if !defined(TOOLKIT_VIEWS) if (parent_) { +#else + // TOOLKIT_VIEWS' resize logic flow matches windows. When the container widget + // is resized, it calls RWH::WasSized, which sizes this widget using SetSize. + // TODO(estade): figure out if the logic flow here can be normalized across + // platforms +#endif gtk_widget_set_size_request(view_.get(), std::min(size.width(), kMaxWindowWidth), std::min(size.height(), kMaxWindowHeight)); +#if !defined(TOOLKIT_VIEWS) } +#endif } gfx::NativeView RenderWidgetHostViewGtk::GetNativeView() { -- cgit v1.1