diff options
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 2abafb0..9528490 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -84,8 +84,10 @@ void WebPluginProxy::Invalidate() { } void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) { - // Ignore NPN_InvalidateRect calls with empty rects. - if (rect.IsEmpty()) + // Ignore NPN_InvalidateRect calls with empty rects. Also don't send an + // invalidate if it's outside the clipping region, since if we did it won't + // lead to a paint and we'll be stuck waiting forever for a DidPaint response. + if (rect.IsEmpty() || !delegate_->clip_rect().Intersects(rect)) return; damaged_rect_ = damaged_rect_.Union(rect); |