summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 20:27:09 +0000
committerstuartmorgan@google.com <stuartmorgan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 20:27:09 +0000
commitd5a8a426e8b64ac9bfb90873b28f47bb2814899a (patch)
treee5246a855f74c7c128d7c4145ae03e1005d6139f /chrome/renderer
parent825dd109a3acdcf2640c531068a602dd8f40a196 (diff)
downloadchromium_src-d5a8a426e8b64ac9bfb90873b28f47bb2814899a.zip
chromium_src-d5a8a426e8b64ac9bfb90873b28f47bb2814899a.tar.gz
chromium_src-d5a8a426e8b64ac9bfb90873b28f47bb2814899a.tar.bz2
Update the Mac plugin dummy window code for the new coordinate system.
Fixes the location of the dummy window, cleans up some duplicate window-handling code, and tries to keep the window activation status more in sync with what it would be in a single-process system. The net result is that event handling in plugins works better, although there are still activation issues. BUG=none TEST=Clicks on plugins should register in the right place (assuming they register at all; there are still bugs in having them handled). Review URL: http://codereview.chromium.org/159525 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index b6ea8dd..5e6ba7a 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -508,10 +508,14 @@ static void FlipRectVerticallyWithHeight(gfx::Rect* rect, int height) {
void WebPluginDelegateProxy::Paint(gfx::NativeDrawingContext context,
const gfx::Rect& damaged_rect) {
+ // Limit the damaged rectangle to whatever is contained inside the plugin
+ // rectangle, as that's the rectangle that we'll actually draw.
+ gfx::Rect rect = damaged_rect.Intersect(plugin_rect_);
+
// If the plugin is no longer connected (channel crashed) draw a crashed
// plugin bitmap
if (!channel_host_->channel_valid()) {
- PaintSadPlugin(context, damaged_rect);
+ PaintSadPlugin(context, rect);
return;
}
@@ -525,9 +529,6 @@ void WebPluginDelegateProxy::Paint(gfx::NativeDrawingContext context,
return;
}
- // Limit the damaged rectangle to whatever is contained inside the plugin
- // rectangle, as that's the rectangle that we'll bitblt to the hdc.
- gfx::Rect rect = damaged_rect.Intersect(plugin_rect_);
gfx::Rect offset_rect = rect;
offset_rect.Offset(-plugin_rect_.x(), -plugin_rect_.y());