Summary: The QuickTime plugin continues to play audio after the OBJECT or EMBED element containing it is removed from the page. To reproduce: 1) Open the testcase in Safari 2) As soon as audio starts, click the Remove OBJECT link 3) Close the window Expected: audio to stop in step 2 Actual: audio only stops in step 3 More information: when the OBJECT element is removed, QWidget::removeFromSuperview() is called, which sends -removeFromSuperview on the plugin's NSView. In WebNetscapePluginView, this stops the plugin. In the QuickTime plugin, it does not. The view is only deallocated when the window is closed, and then audio stops.
Created attachment 4340 [details] testcase (uses external resource)
Created attachment 4360 [details] stop and destroy plugin when removed Send -webPlugInStop (or -pluginStop) and -webPluginDestroy (or -pluginDestroy) to complying plugins right when they're removed from the WebHTMLView, and also release them from the plugin controller's arrays. I think this patch makes WebKit behave more like plugins expect it to, which is the way it already behaves with Netscape plugins. I expect complying plugins to stop making noise when receiving the stop message, but QuickTime doesn't. If it's lucky, then it will be deallocated because of the release and will stop then. However, JS, for one, can retain the plugin (e.g. if you execute <javascript:document.getElementById('obj').width;> before clicking Remove OBJECT), in which case it will just keep playing.
Comment on attachment 4360 [details] stop and destroy plugin when removed r=me
Tim Omernick landed the patch.
*** Bug 6082 has been marked as a duplicate of this bug. ***