diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 23:57:50 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 23:57:50 +0000 |
commit | a3edf84415da5b5085364762f6ce0625ffd0b2d7 (patch) | |
tree | 10643a0da2fc96ca856c4dfe6eb41532a8a697a1 /chrome/plugin/webplugin_proxy.cc | |
parent | e390e92f0270823f947a3468c13c6e0817358aac (diff) | |
download | chromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.zip chromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.tar.gz chromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.tar.bz2 |
Fix offscren invalidation in windowless plugins
Fixes two related issues:
- An invalidate that was entirely off screen, but for a plugin that was partial on-screen, would not trigger a paint when the damaged area was scrolled back into view (all platforms).
- When a Mac plugin's container became visible, damaged regions were not repainted (Mac only).
BUG=41383
TEST=See bug.
Review URL: http://codereview.chromium.org/1629018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/webplugin_proxy.cc')
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 2dfc7a2..c3654e8 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -130,8 +130,8 @@ void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) { // This is not true because scrolling (or window resize) could occur and be // handled by the renderer before it receives the InvalidateRect message, // changing the clip rect and then not painting. - if (invalidate_rect.IsEmpty() || - !delegate_->GetClipRect().Intersects(invalidate_rect)) + if (damaged_rect_.IsEmpty() || + !delegate_->GetClipRect().Intersects(damaged_rect_)) return; // Only send a single InvalidateRect message at a time. From DidPaint we @@ -457,7 +457,7 @@ void WebPluginProxy::UpdateGeometry( // Send over any pending invalidates which occured when the plugin was // off screen. if (delegate_->IsWindowless() && !clip_rect.IsEmpty() && - old_clip_rect.IsEmpty() && !damaged_rect_.IsEmpty()) { + !damaged_rect_.IsEmpty()) { InvalidateRect(damaged_rect_); } |