summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 01:43:49 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 01:43:49 +0000
commit525f9f6d6eab948d11f8a55422ee0e7a352a768d (patch)
tree8535abe850265913281f1de74ebd145d342b8bd4 /webkit/glue/plugins
parent2181ea006830c226a8a3c21aa17030a01ec62a5e (diff)
downloadchromium_src-525f9f6d6eab948d11f8a55422ee0e7a352a768d.zip
chromium_src-525f9f6d6eab948d11f8a55422ee0e7a352a768d.tar.gz
chromium_src-525f9f6d6eab948d11f8a55422ee0e7a352a768d.tar.bz2
Don't call NPP_SetWindow before we have the plugin geometry.
Note: the full fix to the bug also needs Ananta's change at http://codereview.chromium.org/119200 Bug=12993 Review URL: http://codereview.chromium.org/118359 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index 325c294..5cf00a5 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -740,10 +740,10 @@ void WebPluginDelegateImpl::WindowedSetWindow() {
DCHECK(!instance()->windowless());
- window_.clipRect.top = clip_rect_.y();
- window_.clipRect.left = clip_rect_.x();
- window_.clipRect.bottom = clip_rect_.y() + clip_rect_.height();
- window_.clipRect.right = clip_rect_.x() + clip_rect_.width();
+ window_.clipRect.top = std::max(0, clip_rect_.y());
+ window_.clipRect.left = std::max(0, clip_rect_.x());
+ window_.clipRect.bottom = std::max(0, clip_rect_.y() + clip_rect_.height());
+ window_.clipRect.right = std::max(0, clip_rect_.x() + clip_rect_.width());
window_.height = window_rect_.height();
window_.width = window_rect_.width();
window_.x = 0;