Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4690)

Unified Diff: chrome/plugin/webplugin_proxy.cc

Issue 6257: Fix videos stopping playing. An invalidate doesn't always lead to a paint (i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_proxy.cc
===================================================================
--- chrome/plugin/webplugin_proxy.cc (revision 2866)
+++ chrome/plugin/webplugin_proxy.cc (working copy)
@@ -84,8 +84,10 @@
}
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);
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698