diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 6b47b7f2407..1e1a9d1e4eb 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -55,7 +55,6 @@ #include "nsScriptSecurityManager.h" #include "nsDocumentCharsetInfoCID.h" #include "nsICanvasFrame.h" -#include "nsIPluginViewer.h" #include "nsContentPolicyUtils.h" // NS_CheckContentLoadPolicy(...) #include "nsICategoryManager.h" #include "nsXPCOMCID.h" @@ -4605,17 +4604,6 @@ nsDocShell::NewContentViewerObj(const char *aContentType, aViewer), NS_ERROR_FAILURE); - nsCOMPtr pv(do_QueryInterface(*aViewer)); - if (pv) { - if (mName.EqualsIgnoreCase("messagepane")) { - NS_IF_RELEASE(*aViewer); - NS_IF_RELEASE(*aContentHandler); - return NS_ERROR_FAILURE; - } - else - SetTitle(nsnull); // clear title bar for full-page plugin - } - (*aViewer)->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer *, this)); return NS_OK; } diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 2e528be01d3..baa74b6535a 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -94,7 +94,6 @@ #include "nsPIDOMWindow.h" #include "nsIRenderingContext.h" #include "nsIFrameFrame.h" -#include "nsIPluginViewer.h" #include "nsAutoPtr.h" // For Accessibility @@ -732,8 +731,6 @@ NS_IMETHODIMP nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) { - PRBool containsPluginViewer = PR_FALSE; - if (mFrameLoader) { // Get the content viewer through the docshell, but don't call // GetDocShell() since we don't want to create one if we don't @@ -755,37 +752,15 @@ nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) // Hide the content viewer now that the frame is going away... content_viewer->Hide(); - - // Full-page plugins don't have a DOM so they always need to be destroyed - // here, before this frame and window are destroyed. See bug 173938. - // When bug 90256 is fixed this code can probably go away. - nsCOMPtr pluginViewer (do_QueryInterface(content_viewer)); - if (pluginViewer) - containsPluginViewer = PR_TRUE; } } } - if (mFrameLoader) { - if (mOwnsFrameLoader) { - // We own this frame loader, and we're going away, so destroy our - // frame loader. + if (mFrameLoader && mOwnsFrameLoader) { + // We own this frame loader, and we're going away, so destroy our + // frame loader. - mFrameLoader->Destroy(); - - } else if (containsPluginViewer) { - // If this is a full-page plugin, we need to notify content to let go - // of the frame loader so that it will be re-recreated if this frame - // is shown later. - nsCOMPtr content; - GetParentContent(getter_AddRefs(content)); - nsCOMPtr frame_loader_owner (do_QueryInterface(content)); - if (frame_loader_owner) - frame_loader_owner->SetFrameLoader(nsnull); - - mFrameLoader->Destroy(); - mFrameLoader = nsnull; - } + mFrameLoader->Destroy(); } return nsLeafFrame::Destroy(aPresContext); diff --git a/mozilla/layout/html/document/src/Makefile.in b/mozilla/layout/html/document/src/Makefile.in index c2c3c6a5427..ab849ee281f 100644 --- a/mozilla/layout/html/document/src/Makefile.in +++ b/mozilla/layout/html/document/src/Makefile.in @@ -48,7 +48,6 @@ REQUIRES = xpcom \ xpconnect \ accessibility \ webbrwsr \ - plugin \ $(NULL) CPPSRCS = \ diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index 2e528be01d3..baa74b6535a 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -94,7 +94,6 @@ #include "nsPIDOMWindow.h" #include "nsIRenderingContext.h" #include "nsIFrameFrame.h" -#include "nsIPluginViewer.h" #include "nsAutoPtr.h" // For Accessibility @@ -732,8 +731,6 @@ NS_IMETHODIMP nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) { - PRBool containsPluginViewer = PR_FALSE; - if (mFrameLoader) { // Get the content viewer through the docshell, but don't call // GetDocShell() since we don't want to create one if we don't @@ -755,37 +752,15 @@ nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) // Hide the content viewer now that the frame is going away... content_viewer->Hide(); - - // Full-page plugins don't have a DOM so they always need to be destroyed - // here, before this frame and window are destroyed. See bug 173938. - // When bug 90256 is fixed this code can probably go away. - nsCOMPtr pluginViewer (do_QueryInterface(content_viewer)); - if (pluginViewer) - containsPluginViewer = PR_TRUE; } } } - if (mFrameLoader) { - if (mOwnsFrameLoader) { - // We own this frame loader, and we're going away, so destroy our - // frame loader. + if (mFrameLoader && mOwnsFrameLoader) { + // We own this frame loader, and we're going away, so destroy our + // frame loader. - mFrameLoader->Destroy(); - - } else if (containsPluginViewer) { - // If this is a full-page plugin, we need to notify content to let go - // of the frame loader so that it will be re-recreated if this frame - // is shown later. - nsCOMPtr content; - GetParentContent(getter_AddRefs(content)); - nsCOMPtr frame_loader_owner (do_QueryInterface(content)); - if (frame_loader_owner) - frame_loader_owner->SetFrameLoader(nsnull); - - mFrameLoader->Destroy(); - mFrameLoader = nsnull; - } + mFrameLoader->Destroy(); } return nsLeafFrame::Destroy(aPresContext); diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 49318e7d519..772532959e1 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -125,8 +125,6 @@ #include "winbase.h" #endif -#include "nsPluginDocLoaderFactory.h" - #include "nsIMIMEService.h" #include "nsCExternalHandlerService.h" #include "nsILocalFile.h" @@ -337,25 +335,8 @@ nsresult nsPluginDocReframeEvent::HandlePluginDocReframeEvent() { } } else { // no pres shell --> full-page plugin - /** - * This document does not have a presentation shell. It may be a full-page plugin. - * Full-page plugins don't really have the same problem of crashing because they - * are not currently scriptable. However, they do leave a non-painting, defunct - * window which doesn't look good. A reload of the page for full-page plugins - * is needed to kickstart the instance. - */ - - nsCOMPtr gso; - doc->GetScriptGlobalObject(getter_AddRefs(gso)); - if (gso) { - nsCOMPtr docShell; - gso->GetDocShell(getter_AddRefs(docShell)); - nsCOMPtr webNav (do_QueryInterface(docShell)); - if (webNav) - webNav->Reload(nsIWebNavigation::LOAD_FLAGS_NONE); - - else NS_WARNING("refreshing plugins: couldn't get webnav or docshell from gso"); - } else NS_WARNING("refreshing plugins: could not get the global script object -- did the plugin set it?"); + NS_NOTREACHED("all plugins should have a pres shell!"); + } } } @@ -3521,7 +3502,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbededPlugin(const char *aMimeType, //////////////////////////////////////////////////////////////////////// -/* Called by nsPluginViewer.cpp (full-page case) */ +/* Called by full-page case */ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType, nsString& aURLSpec, nsIStreamListener *&aStreamListener, @@ -3681,24 +3662,9 @@ nsPluginTag::RegisterWithCategoryManager(PRBool aOverrideInternalTypes, nsCOMPtr catMan = do_GetService(NS_CATEGORYMANAGER_CONTRACTID); if (!catMan) return; - - // XXX temporary for testing transition - static PRBool sLoadViaPlugin = PR_FALSE; - static PRBool sLoadViaPluginInitialized = PR_FALSE; - if (!sLoadViaPluginInitialized) { - nsCOMPtr prefService = - do_GetService(NS_PREFSERVICE_CONTRACTID); - if (prefService) { - sLoadViaPluginInitialized = PR_TRUE; - nsCOMPtr prefBranch; - prefService->GetBranch(nsnull, getter_AddRefs(prefBranch)); - if (prefBranch) - prefBranch->GetBoolPref("plugin.disable_load_full_page_via_content", &sLoadViaPlugin); - } - } + + const char *contractId = "@mozilla.org/content/plugin/document-loader-factory;1"; - const char *contractId = sLoadViaPlugin ? "@mozilla.org/plugin/doc-loader/factory;1" : - "@mozilla.org/content/plugin/document-loader-factory;1"; for(int i = 0; i < mVariants; i++) { if (aType == ePluginUnregister) { nsXPIDLCString value; diff --git a/mozilla/modules/plugin/base/src/nsPluginModule.cpp b/mozilla/modules/plugin/base/src/nsPluginModule.cpp index 40b27b4c161..d2013544ae1 100644 --- a/mozilla/modules/plugin/base/src/nsPluginModule.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginModule.cpp @@ -40,7 +40,6 @@ #include "nsIPluginManager.h" #include "nsPluginsCID.h" #include "nsPluginHostImpl.h" -#include "nsPluginDocLoaderFactory.h" #include "ns4xPlugin.h" static const nsModuleComponentInfo gComponentInfo[] = { @@ -53,11 +52,6 @@ static const nsModuleComponentInfo gComponentInfo[] = { NS_PLUGINMANAGER_CID, "@mozilla.org/plugin/manager;1", nsPluginHostImpl::Create }, - - { "Plugin Doc Loader Factory", - NS_PLUGINDOCLOADERFACTORY_CID, - "@mozilla.org/plugin/doc-loader/factory;1", - nsPluginDocLoaderFactory::Create }, }; PR_STATIC_CALLBACK(void)