diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 20:38:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 20:38:57 +0000 |
commit | 20c011b32824e396743f8dbbdf4de068b4bac294 (patch) | |
tree | 5c4c0a0094eb3be2d4ca2b14df9bca00dfb0935b /chrome | |
parent | 4a3305da6c155d23631c7c8371f7842325b88d17 (diff) | |
download | chromium_src-20c011b32824e396743f8dbbdf4de068b4bac294.zip chromium_src-20c011b32824e396743f8dbbdf4de068b4bac294.tar.gz chromium_src-20c011b32824e396743f8dbbdf4de068b4bac294.tar.bz2 |
Fix videos stopping playing. Only send an invalidate to the renderer if it's within the clipping region, otherwise we'll wait forever for a did paint message that doesn't come.
BUG=115
Review URL: http://codereview.chromium.org/6257
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-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); |