From 2b5b8bac901de2dfcec20e5b01944d9e1cd4a2fd Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Sat, 6 Mar 2010 15:32:44 +0000 Subject: Make plugin buffer changes robust against synchronous plugin call nesting Makes SetWindowlessBuffer take a rect argument so it doesn't depend on the delegate being updated, then makes UpdateGeometry call that first so that changes can't accidentally be handled in reverse order if calling into the plugin's SetWindow results in nesting. Also combines updating the plugin geometry and context on the Mac into one call, since we don't want the plugin to have mismatched context and size information. Unblacklists Move Networks player on the Mac since these changes fix its crash. BUG=28298 TEST=Open the Move Networks sample on the Mac, and resize it. It should play without crashing. Review URL: http://codereview.chromium.org/668186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40841 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/plugins/webplugin_delegate_impl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'webkit/glue/plugins/webplugin_delegate_impl.h') diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h index 520da4c..1327464 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl.h +++ b/webkit/glue/plugins/webplugin_delegate_impl.h @@ -112,9 +112,11 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate { int GetQuirks() const { return quirks_; } #if defined(OS_MACOSX) - // Informs the delegate that the context used for painting windowless plugins - // has changed. - void UpdateContext(gfx::NativeDrawingContext context); + // Informs the plugin that the geometry has changed, as with UpdateGeometry, + // but also includes the new buffer context for that new geometry. + void UpdateGeometryAndContext(const gfx::Rect& window_rect, + const gfx::Rect& clip_rect, + gfx::NativeDrawingContext context); // Returns the delegate currently processing events. static WebPluginDelegateImpl* GetActiveDelegate(); // Returns a vector of currently active delegates in this process. -- cgit v1.1