From 7387f9b7d64f0e41807dd0266fa78a3d28d46dae Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Thu, 15 Jul 2004 16:12:22 +0000 Subject: [PATCH] Bug 251481 remove nsIDocStreamLoaderFactory r+sr=bz git-svn-id: svn://10.0.0.236/trunk@159255 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/build/nsContentDLF.cpp | 69 +------------------ mozilla/layout/build/nsContentDLF.h | 18 +---- mozilla/webshell/public/Makefile.in | 1 - .../public/nsIDocStreamLoaderFactory.h | 66 ------------------ 4 files changed, 3 insertions(+), 151 deletions(-) delete mode 100644 mozilla/webshell/public/nsIDocStreamLoaderFactory.h diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index 79f4d3f44c9..13777055120 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -60,7 +60,6 @@ #include "nsRDFCID.h" #include "nsIRDFResource.h" -#include "nsIDocStreamLoaderFactory.h" #include "imgILoader.h" @@ -146,9 +145,8 @@ nsContentDLF::~nsContentDLF() { } -NS_IMPL_ISUPPORTS2(nsContentDLF, - nsIDocumentLoaderFactory, - nsIDocStreamLoaderFactory) +NS_IMPL_ISUPPORTS1(nsContentDLF, + nsIDocumentLoaderFactory) NS_IMETHODIMP nsContentDLF::CreateInstance(const char* aCommand, @@ -437,34 +435,6 @@ nsContentDLF::CreateDocument(const char* aCommand, return rv; } -NS_IMETHODIMP -nsContentDLF::CreateInstance(nsIInputStream& aInputStream, - const char* aContentType, - const char* aCommand, - nsISupports* aContainer, - nsISupports* aExtraInfo, - nsIContentViewer** aDocViewer) - -{ - nsresult status = NS_ERROR_FAILURE; - - EnsureUAStyleSheet(); - - // Try RDF - int typeIndex = 0; - while (gRDFTypes[typeIndex]) { - if (0 == PL_strcmp(gRDFTypes[typeIndex++], aContentType)) { - return CreateXULDocumentFromStream(aInputStream, - aCommand, - aContainer, - aExtraInfo, - aDocViewer); - } - } - - return status; -} - // ...common work for |CreateRDFDocument| and |CreateXULDocumentFromStream| nsresult nsContentDLF::CreateRDFDocument(nsISupports* aExtraInfo, @@ -531,41 +501,6 @@ nsContentDLF::CreateRDFDocument(const char* aCommand, return rv; } -nsresult -nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream, - const char* aCommand, - nsISupports* aContainer, - nsISupports* aExtraInfo, - nsIContentViewer** aDocViewer) -{ - nsresult status = NS_OK; - -#if 0 // XXX dead code; remove - do - { - nsCOMPtr doc; - nsCOMPtr docv; - if ( NS_FAILED(status = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv))) ) - break; - - if ( NS_FAILED(status = docv->LoadStart(doc)) ) - break; - - *aDocViewer = docv; - NS_IF_ADDREF(*aDocViewer); - - nsCOMPtr loader = do_QueryInterface(doc, &status); - if ( NS_FAILED(status) ) - break; - - status = loader->LoadFromStream(aXULStream, aContainer, aCommand); - } - while (0); -#endif - - return status; -} - static nsresult RegisterTypes(nsICategoryManager* aCatMgr, const char* const* aTypes) diff --git a/mozilla/layout/build/nsContentDLF.h b/mozilla/layout/build/nsContentDLF.h index 396ac123939..f4dc7e9a55f 100644 --- a/mozilla/layout/build/nsContentDLF.h +++ b/mozilla/layout/build/nsContentDLF.h @@ -39,7 +39,6 @@ #define nsContentDLF_h__ #include "nsIDocumentLoaderFactory.h" -#include "nsIDocStreamLoaderFactory.h" #include "nsIDocumentViewer.h" #include "nsIDocument.h" @@ -54,8 +53,7 @@ class nsILoadGroup; class nsIStreamListener; struct nsModuleComponentInfo; -class nsContentDLF : public nsIDocumentLoaderFactory, - public nsIDocStreamLoaderFactory +class nsContentDLF : public nsIDocumentLoaderFactory { public: nsContentDLF(); @@ -64,14 +62,6 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIDOCUMENTLOADERFACTORY - // for nsIDocStreamLoaderFactory - NS_METHOD CreateInstance(nsIInputStream& aInputStream, - const char* aContentType, - const char* aCommand, - nsISupports* aContainer, - nsISupports* aExtraInfo, - nsIContentViewer** aDocViewer); - nsresult InitUAStyleSheet(); nsresult CreateDocument(const char* aCommand, @@ -91,12 +81,6 @@ public: nsIStreamListener** aDocListener, nsIContentViewer** aDocViewer); - nsresult CreateXULDocumentFromStream(nsIInputStream& aXULStream, - const char* aCommand, - nsISupports* aContainer, - nsISupports* aExtraInfo, - nsIContentViewer** aDocViewer); - nsresult CreateRDFDocument(nsISupports*, nsCOMPtr*, nsCOMPtr*); diff --git a/mozilla/webshell/public/Makefile.in b/mozilla/webshell/public/Makefile.in index 23fc008bad6..3263f6f22f5 100644 --- a/mozilla/webshell/public/Makefile.in +++ b/mozilla/webshell/public/Makefile.in @@ -62,7 +62,6 @@ XPIDLSRCS = \ $(NULL) EXPORTS = \ - nsIDocStreamLoaderFactory.h \ nsILinkHandler.h \ nsIWebShell.h \ nsIWebShellServices.h \ diff --git a/mozilla/webshell/public/nsIDocStreamLoaderFactory.h b/mozilla/webshell/public/nsIDocStreamLoaderFactory.h deleted file mode 100644 index b566120d47e..00000000000 --- a/mozilla/webshell/public/nsIDocStreamLoaderFactory.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ -#ifndef nsIDocStreamLoaderFactory_h___ -#define nsIDocStreamLoaderFactory_h___ - -// Wrapping includes can speed up compiles (see "Large Scale C++ -// Software Design") -#ifndef nsISupports_h___ -#include "nsISupports.h" -#endif - -class nsIInputStream; -class nsIContentViewer; - -/* 9188bc80-f92e-11d2-81ef-0060083a0bcf */ -#define NS_IDOCSTREAMLOADERFACTORY_IID \ - { 0x9188bc80, 0xf92e, 0x11d2,{0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf}} - -class nsIDocStreamLoaderFactory : public nsISupports -{ -public: - NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCSTREAMLOADERFACTORY_IID) - - NS_IMETHOD CreateInstance(nsIInputStream& aInputStream, - const char* aContentType, - const char* aCommand, - nsISupports* aContainer, - nsISupports* aExtraInfo, - nsIContentViewer** aDocViewer) = 0; -}; - -#endif /* !defined(nsIDocStreamLoaderFactory_h___) */