summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 15:10:18 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 15:10:18 +0000
commitcbc02a6e3c47b23e288ab9fe94d313e9be2a47f5 (patch)
tree7ae7f5694ae9c6b874720d2bb059f315fcc252fe /webkit/glue
parent42cb9be2c89933dd739926b1bfe352c3d0ed73cc (diff)
downloadchromium_src-cbc02a6e3c47b23e288ab9fe94d313e9be2a47f5.zip
chromium_src-cbc02a6e3c47b23e288ab9fe94d313e9be2a47f5.tar.gz
chromium_src-cbc02a6e3c47b23e288ab9fe94d313e9be2a47f5.tar.bz2
Fix CoreGraphics and Core Animation drawing for QuickTime plugin
Conditionalizes a SetWindow call that was added to fix a crash in QuickDraw mode, but isn't necessary (and causes QuickTime not to draw) in other drawing modes. BUG=38336,36896,35081 TEST=Play QuickTime movies on 10.6. The ones with floating controllers (36896) should draw again, and the other should not only work, but have smoother playback and use less CPU. The test case for bug 35081 should still not crash. Review URL: http://codereview.chromium.org/1569005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/plugin_host.cc11
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm15
2 files changed, 11 insertions, 15 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc
index 5ceea68..b262188 100644
--- a/webkit/glue/plugins/plugin_host.cc
+++ b/webkit/glue/plugins/plugin_host.cc
@@ -794,16 +794,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
case NPNVsupportsCoreAnimationBool: {
// We only support the Core Animation model on 10.6 and higher
NPBool* supports_model = reinterpret_cast<NPBool*>(value);
- // Our Core Animation support currently doesn't handle QuickTime correctly
- // (see <http://crbug.com/38336>), so for now we don't allow QuickTime to
- // negotiate that model.
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
- if (plugin &&
- plugin->plugin_lib()->plugin_info().name.find(L"QuickTime") !=
- std::wstring::npos)
- *supports_model = FALSE;
- else
- *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE;
+ *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE;
rv = NPERR_NO_ERROR;
break;
}
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index d2445ed..a99c39e 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -341,11 +341,16 @@ void WebPluginDelegateImpl::PlatformInitialize() {
UpdateIdleEventRate();
#endif
- // 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.
- const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
- if (plugin_info.name.find(L"QuickTime") != std::wstring::npos)
- WindowlessSetWindow(true);
+ // QuickTime (in QD mode only) 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.
+#ifndef NP_NO_QUICKDRAW
+ if (instance()->drawing_model() == NPDrawingModelQuickDraw) {
+ const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
+ if (plugin_info.name.find(L"QuickTime") != std::wstring::npos)
+ WindowlessSetWindow(true);
+ }
+#endif
}
void WebPluginDelegateImpl::PlatformDestroyInstance() {