summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/webplugin_delegate_impl.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-15 11:46:04 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-15 11:46:04 +0000
commit3d8835ce738f3bb2f7006d3d195723a97170c856 (patch)
tree4a2d60eeed2783f52ff8283cce732c9beb46e2e4 /webkit/glue/plugins/webplugin_delegate_impl.cc
parentf69ae902bf6a334736a09e6ad278a6b63f4cb704 (diff)
downloadchromium_src-3d8835ce738f3bb2f7006d3d195723a97170c856.zip
chromium_src-3d8835ce738f3bb2f7006d3d195723a97170c856.tar.gz
chromium_src-3d8835ce738f3bb2f7006d3d195723a97170c856.tar.bz2
Match the Windows plugin moving/sizing behavior on Linux.
This keep the sizing operations in WebPluginDelegateImpl, and does the moving in DidMove. This more or less matches what currently happens on Windows. Add a comment explaining this situation better. Add some random comments and small code cleanup. Remove the flash useragent spoofing hack on non-Windows, we don't need to worry about this for now. Review URL: http://codereview.chromium.org/20304 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/webplugin_delegate_impl.cc')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index 0ab5c02..bb3d527 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -690,7 +690,15 @@ bool WebPluginDelegateImpl::WindowedReposition(
if (window_rect_ == window_rect && clip_rect_ == clip_rect)
return false;
- // Clipping is handled by WebPlugin.
+ // There are a few parts to managing the plugin windows:
+ // - Initial geometry, show / resize / position the window.
+ // - Geometry updates, resize the window.
+ // - Geometry updates, move the window or update the clipping region.
+ // This code should handle the first two, positioning and sizing the window
+ // initially, and resizing it when the size changes. Clipping and moving are
+ // handled separately by WebPlugin, after it has called this code. This
+ // allows window moves, like scrolling, to be synchronized with painting.
+ // See WebPluginImpl::setFrameRect().
if (window_rect.size() != window_rect_.size()) {
::SetWindowPos(windowed_handle_,
NULL,