diff options
Diffstat (limited to 'dom/base/nsObjectLoadingContent.cpp')
-rw-r--r-- | dom/base/nsObjectLoadingContent.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index f8541c61ba..4129135baa 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -95,6 +95,13 @@ #endif #endif // XP_WIN +#ifdef XP_MACOSX +// HandlePluginCrashed() and HandlePluginInstantiated() needed from here to +// fix bug 1147521. Should later be replaced by proper interface methods, +// maybe on nsIObjectLoadingContext. +#include "mozilla/dom/HTMLObjectElement.h" +#endif + static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); static const char *kPrefJavaMIME = "plugin.java.mime"; @@ -909,6 +916,10 @@ nsObjectLoadingContent::InstantiatePluginInstance(bool aIsLoading) NS_LITERAL_STRING("PluginInstantiated")); NS_DispatchToCurrentThread(ev); +#ifdef XP_MACOSX + HTMLObjectElement::HandlePluginInstantiated(thisContent->AsElement()); +#endif + return NS_OK; } @@ -2907,6 +2918,10 @@ nsObjectLoadingContent::PluginCrashed(nsIPluginTag* aPluginTag, nsCOMPtr<nsIContent> thisContent = do_QueryInterface(static_cast<nsIImageLoadingContent*>(this)); +#ifdef XP_MACOSX + HTMLObjectElement::HandlePluginCrashed(thisContent->AsElement()); +#endif + PluginDestroyed(); // Switch to fallback/crashed state, notify @@ -3145,6 +3160,10 @@ nsObjectLoadingContent::DoStopPlugin(nsPluginInstanceOwner* aInstanceOwner, return; } +#if defined(XP_MACOSX) + aInstanceOwner->HidePluginWindow(); +#endif + RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst(); NS_ASSERTION(pluginHost, "No plugin host?"); pluginHost->StopPluginInstance(inst); |