From 390e55e7e0e4e749e1380093a6ca2be3a491ac65 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Mon, 22 Jun 2009 17:56:49 +0000 Subject: linux plugins: only set size in WindowedReposition This matches the Windows implementation more closely. As on Windows, positioning is controlled by the WebView delegate's DidMove() implementation. I also synced the comments with the original file so it'll be easier to unfork. TEST=windowed plugins are still positioned properly in test_shell Review URL: http://codereview.chromium.org/141034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18912 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'webkit') diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 9762ee2..3ff1077 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -363,16 +363,12 @@ bool WebPluginDelegateImpl::WindowedReposition( if (window_rect_ == window_rect && clip_rect_ == clip_rect) return false; - + // We only set the plugin's size here. Its position is moved elsewhere, which + // allows the window moves/scrolling/clipping to be synchronized with the page + // and other windows. if (window_rect.size() != window_rect_.size()) { - // Clipping is handled by WebPlugin. - GtkAllocation allocation = { window_rect.x(), window_rect.y(), + GtkAllocation allocation = { 0, 0, window_rect.width(), window_rect.height() }; - // TODO(deanm): we probably want to match Windows here, where x and y is - // fixed at 0, and we're just sizing the window. - // Tell our parent GtkFixed container where to place the widget. - gtk_fixed_move( - GTK_FIXED(parent_), windowed_handle_, window_rect.x(), window_rect.y()); gtk_widget_size_allocate(windowed_handle_, &allocation); } -- cgit v1.1