summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 17:30:52 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 17:30:52 +0000
commitee48d179fbf2376a62ff4d6b928f2725c088bf10 (patch)
tree3babdc2c85799f61753573c1196153cbcbfa647b /webkit/glue
parent38364fd79c17db99541a7ed5fab9e8c253e76949 (diff)
downloadchromium_src-ee48d179fbf2376a62ff4d6b928f2725c088bf10.zip
chromium_src-ee48d179fbf2376a62ff4d6b928f2725c088bf10.tar.gz
chromium_src-ee48d179fbf2376a62ff4d6b928f2725c088bf10.tar.bz2
Fix the initial draw handing of Core Animation plugins
Removes the call to SetWindow(NULL) in the Core Animation case, since that causes the delegate to enable the TransportDIB drawing mode. Removes the early return in Paint, since now we don't call it (and if we do later, it'll be to get snapshots using the existing Cocoa event model path, per the ammended CA drawing model spec). Also renames windowless_ in WebPluginDelegateProxy to make it clear that it's just about drawing. BUG=37974 TEST=In a build with Core Animation plugin enabled, there should be no flash of black when the plugin is first drawn. Review URL: http://codereview.chromium.org/982010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41961 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm13
1 files changed, 6 insertions, 7 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 19815b9..08995ee 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -301,12 +301,17 @@ void WebPluginDelegateImpl::PlatformInitialize() {
// point, so we just set the initial state directly.
container_is_visible_ = true;
+ // Let the WebPlugin know that we are windowless (unless this is a
+ // Core Animation plugin, in which case BindFakePluginWindowHandle will take
+ // care of setting up the appropriate window handle).
+ if (instance()->drawing_model() != NPDrawingModelCoreAnimation)
+ plugin_->SetWindow(NULL);
+
#ifndef NP_NO_CARBON
// If the plugin wants Carbon events, hook up to the source of idle events.
if (instance()->event_model() == NPEventModelCarbon)
UpdateIdleEventRate();
#endif
- plugin_->SetWindow(NULL);
// QuickTime can crash if it gets other calls (e.g., NPP_Write) before it
// gets a SetWindow call, so call SetWindow (with a 0x0 rect) immediately.
@@ -443,12 +448,6 @@ void WebPluginDelegateImpl::DrawLayerInSurface() {
void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
const gfx::Rect& damage_rect) {
- // There is currently nothing to do for the Core Animation drawing model,
- // but there have been discussions on the plugin-futures mailing list that
- // might require future work.
- if (instance()->drawing_model() == NPDrawingModelCoreAnimation)
- return;
-
// If we somehow get a paint before we've set up the plugin buffer, bail.
if (!buffer_context_)
return;