From 56fcc3f051d030df1195fc543b93fca550b4e8e0 Mon Sep 17 00:00:00 2001 From: "piman@chromium.org" Date: Fri, 7 Aug 2009 00:34:55 +0000 Subject: linux: fix windowless Flash when scrolling Apparently on linux windowless Flash needs a paint after a NPP_SetWindow, otherwise it cancels its timer to do InvalidateRect. Also in this change: WebKit calls WebPluginImpl::setFrameRect at each paint, even if the rects haven't changed. That used to always send a message to the plugin process, which is unnecessary (that case is always a no-op in the WebPluginDelegateImpl), so I fixed that too. BUG=18423 Review URL: http://codereview.chromium.org/159907 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22702 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/webplugin_proxy.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/plugin') diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 6aee645..0e2e006 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -182,6 +182,12 @@ void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) { // 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. + // + // TODO(piman): There is a race condition here, because this test assumes + // that when the paint actually occurs, the clip rect will not have changed. + // 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 (rect.IsEmpty() || !delegate_->GetClipRect().Intersects(rect)) return; -- cgit v1.1