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

Unified Diff: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc

Issue 159907: linux: fix windowless Flash when scrolling (Closed)
Patch Set: address review comments Created 11 years, 4 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
Index: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
index 0e394cedac640bbd764abc64a88778817f5296ba..eb9f963fd1282471f210112e2d6e5b831b06fdc5 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
@@ -74,7 +74,8 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
if (instance_->mime_type() == "application/x-shockwave-flash") {
// Flash is tied to Firefox's whacky behavior with windowless plugins. See
// comments in WindowlessPaint
- quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW;
+ quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW
+ | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW;
}
}
@@ -616,6 +617,12 @@ void WebPluginDelegateImpl::WindowlessSetWindow(bool force_set_window) {
NPError err = instance()->NPP_SetWindow(&window_);
DCHECK(err == NPERR_NO_ERROR);
+ if (quirks_ & PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW) {
+ // After a NPP_SetWindow, Flash cancels its timer that generates the
+ // invalidates until it gets a paint event, but doesn't explicitly call
+ // NPP_InvalidateRect.
+ plugin_->InvalidateRect(clip_rect_);
+ }
}
void WebPluginDelegateImpl::SetFocus() {

Powered by Google App Engine
This is Rietveld 408576698