Bug 655261 - Remove nsIParserFilter from the tree. r=mrbkap.
This commit is contained in:
@@ -48,7 +48,6 @@
|
|||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsUnicharUtils.h"
|
#include "nsUnicharUtils.h"
|
||||||
#include "nsHTMLDocument.h"
|
#include "nsHTMLDocument.h"
|
||||||
#include "nsIParserFilter.h"
|
|
||||||
#include "nsIHTMLContentSink.h"
|
#include "nsIHTMLContentSink.h"
|
||||||
#include "nsIXMLContentSink.h"
|
#include "nsIXMLContentSink.h"
|
||||||
#include "nsHTMLParts.h"
|
#include "nsHTMLParts.h"
|
||||||
|
|||||||
@@ -157,12 +157,6 @@ nsHtml5Parser::SetDocumentCharset(const nsACString& aCharset,
|
|||||||
aCharsetSource);
|
aCharsetSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(void)
|
|
||||||
nsHtml5Parser::SetParserFilter(nsIParserFilter* aFilter)
|
|
||||||
{
|
|
||||||
NS_ERROR("Attempt to set a parser filter on HTML5 parser.");
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsHtml5Parser::GetChannel(nsIChannel** aChannel)
|
nsHtml5Parser::GetChannel(nsIChannel** aChannel)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
#include "nsITokenizer.h"
|
#include "nsITokenizer.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsIContentSink.h"
|
#include "nsIContentSink.h"
|
||||||
#include "nsIParserFilter.h"
|
|
||||||
#include "nsIRequest.h"
|
#include "nsIRequest.h"
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
@@ -117,11 +116,6 @@ class nsHtml5Parser : public nsIParser,
|
|||||||
NS_NOTREACHED("No one should call this.");
|
NS_NOTREACHED("No one should call this.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* No-op for backwards compat.
|
|
||||||
*/
|
|
||||||
NS_IMETHOD_(void) SetParserFilter(nsIParserFilter* aFilter);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the channel associated with this parser
|
* Get the channel associated with this parser
|
||||||
* @param aChannel out param that will contain the result
|
* @param aChannel out param that will contain the result
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ EXPORTS = \
|
|||||||
nsIParserNode.h \
|
nsIParserNode.h \
|
||||||
nsIParser.h \
|
nsIParser.h \
|
||||||
nsIDTD.h \
|
nsIDTD.h \
|
||||||
nsIParserFilter.h \
|
|
||||||
nsIElementObserver.h \
|
nsIElementObserver.h \
|
||||||
nsIParserService.h \
|
nsIParserService.h \
|
||||||
nsHTMLTagList.h \
|
nsHTMLTagList.h \
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
#include "nsIAtom.h"
|
#include "nsIAtom.h"
|
||||||
|
|
||||||
#define NS_IPARSER_IID \
|
#define NS_IPARSER_IID \
|
||||||
{ 0xc9169398, 0x897a, 0x481d, \
|
{ 0x0c8c3998, 0x9959, 0x496e, \
|
||||||
{ 0xa9, 0x5f, 0xd6, 0x60, 0x6e, 0xf8, 0x37, 0x56 } }
|
{ 0xbd, 0xd9, 0x0b, 0x6f, 0xc4, 0x1c, 0x3b, 0x87 } }
|
||||||
|
|
||||||
// {41421C60-310A-11d4-816F-000064657374}
|
// {41421C60-310A-11d4-816F-000064657374}
|
||||||
#define NS_IDEBUG_DUMP_CONTENT_IID \
|
#define NS_IDEBUG_DUMP_CONTENT_IID \
|
||||||
@@ -65,7 +65,6 @@
|
|||||||
|
|
||||||
class nsIContentSink;
|
class nsIContentSink;
|
||||||
class nsIRequestObserver;
|
class nsIRequestObserver;
|
||||||
class nsIParserFilter;
|
|
||||||
class nsString;
|
class nsString;
|
||||||
class nsIURI;
|
class nsIURI;
|
||||||
class nsIChannel;
|
class nsIChannel;
|
||||||
@@ -176,8 +175,6 @@ class nsIParser : public nsISupports {
|
|||||||
NS_IMETHOD_(void) SetDocumentCharset(const nsACString& aCharset, PRInt32 aSource)=0;
|
NS_IMETHOD_(void) SetDocumentCharset(const nsACString& aCharset, PRInt32 aSource)=0;
|
||||||
NS_IMETHOD_(void) GetDocumentCharset(nsACString& oCharset, PRInt32& oSource)=0;
|
NS_IMETHOD_(void) GetDocumentCharset(nsACString& oCharset, PRInt32& oSource)=0;
|
||||||
|
|
||||||
NS_IMETHOD_(void) SetParserFilter(nsIParserFilter* aFilter) = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the channel associated with this parser
|
* Get the channel associated with this parser
|
||||||
* @update harishd,gagan 07/17/01
|
* @update harishd,gagan 07/17/01
|
||||||
|
|||||||
@@ -1,75 +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.org 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 ***** */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MODULE NOTES:
|
|
||||||
* @update jevering 6/17/98
|
|
||||||
*
|
|
||||||
* This interface is not yet used; it was intended to allow an observer object
|
|
||||||
* to "look at" the i/o stream coming into the parser before, during and after
|
|
||||||
* the parser saw it. The intention of this was to allow an observer to modify
|
|
||||||
* the stream at various stages.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef IPARSERFILTER
|
|
||||||
#define IPARSERFILTER
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
class CToken;
|
|
||||||
|
|
||||||
#define NS_IPARSERFILTER_IID \
|
|
||||||
{0x14d6ff0, 0x0610, 0x11d2, \
|
|
||||||
{0x8c, 0x3f, 0x00, 0x80, 0x5f, 0x8a, 0x1d, 0xb7}}
|
|
||||||
|
|
||||||
|
|
||||||
class nsIParserFilter : public nsISupports {
|
|
||||||
public:
|
|
||||||
|
|
||||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPARSERFILTER_IID)
|
|
||||||
|
|
||||||
NS_IMETHOD RawBuffer(const char * buffer, PRUint32 * buffer_length) = 0;
|
|
||||||
|
|
||||||
NS_IMETHOD Finish() = 0;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIParserFilter, NS_IPARSERFILTER_IID)
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -746,7 +746,6 @@ nsParser::Initialize(bool aConstructor)
|
|||||||
else {
|
else {
|
||||||
// nsCOMPtrs
|
// nsCOMPtrs
|
||||||
mObserver = nsnull;
|
mObserver = nsnull;
|
||||||
mParserFilter = nsnull;
|
|
||||||
mUnusedInput.Truncate();
|
mUnusedInput.Truncate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -856,12 +855,6 @@ nsParser::PostContinueEvent()
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(void)
|
|
||||||
nsParser::SetParserFilter(nsIParserFilter * aFilter)
|
|
||||||
{
|
|
||||||
mParserFilter = aFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP_(void)
|
NS_IMETHODIMP_(void)
|
||||||
nsParser::GetCommand(nsCString& aCommand)
|
nsParser::GetCommand(nsCString& aCommand)
|
||||||
{
|
{
|
||||||
@@ -2626,7 +2619,6 @@ nsParser::DetectMetaTag(const char* aBytes,
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
bool mNeedCharsetCheck;
|
bool mNeedCharsetCheck;
|
||||||
nsParser* mParser;
|
nsParser* mParser;
|
||||||
nsIParserFilter* mParserFilter;
|
|
||||||
nsScanner* mScanner;
|
nsScanner* mScanner;
|
||||||
nsIRequest* mRequest;
|
nsIRequest* mRequest;
|
||||||
} ParserWriteStruct;
|
} ParserWriteStruct;
|
||||||
@@ -2696,9 +2688,6 @@ ParserWriteFunc(nsIInputStream* in,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pws->mParserFilter)
|
|
||||||
pws->mParserFilter->RawBuffer(buf, &theNumRead);
|
|
||||||
|
|
||||||
result = pws->mScanner->Append(buf, theNumRead, pws->mRequest);
|
result = pws->mScanner->Append(buf, theNumRead, pws->mRequest);
|
||||||
if (NS_SUCCEEDED(result)) {
|
if (NS_SUCCEEDED(result)) {
|
||||||
*writeCount = count;
|
*writeCount = count;
|
||||||
@@ -2747,7 +2736,6 @@ nsParser::OnDataAvailable(nsIRequest *request, nsISupports* aContext,
|
|||||||
pws.mNeedCharsetCheck =
|
pws.mNeedCharsetCheck =
|
||||||
(0 == sourceOffset) && (mCharsetSource < kCharsetFromMetaTag);
|
(0 == sourceOffset) && (mCharsetSource < kCharsetFromMetaTag);
|
||||||
pws.mParser = this;
|
pws.mParser = this;
|
||||||
pws.mParserFilter = mParserFilter;
|
|
||||||
pws.mScanner = theContext->mScanner;
|
pws.mScanner = theContext->mScanner;
|
||||||
pws.mRequest = request;
|
pws.mRequest = request;
|
||||||
|
|
||||||
@@ -2802,9 +2790,6 @@ nsParser::OnStopRequest(nsIRequest *request, nsISupports* aContext,
|
|||||||
|
|
||||||
mStreamStatus = status;
|
mStreamStatus = status;
|
||||||
|
|
||||||
if (mParserFilter)
|
|
||||||
mParserFilter->Finish();
|
|
||||||
|
|
||||||
if (IsOkToProcessNetworkData() && NS_SUCCEEDED(rv)) {
|
if (IsOkToProcessNetworkData() && NS_SUCCEEDED(rv)) {
|
||||||
mProcessingNetworkData = true;
|
mProcessingNetworkData = true;
|
||||||
if (mSink) {
|
if (mSink) {
|
||||||
|
|||||||
@@ -84,7 +84,6 @@
|
|||||||
#include "nsDTDUtils.h"
|
#include "nsDTDUtils.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsIContentSink.h"
|
#include "nsIContentSink.h"
|
||||||
#include "nsIParserFilter.h"
|
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsWeakReference.h"
|
#include "nsWeakReference.h"
|
||||||
@@ -177,9 +176,6 @@ class nsParser : public nsIParser,
|
|||||||
aSource = mCharsetSource;
|
aSource = mCharsetSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHOD_(void) SetParserFilter(nsIParserFilter* aFilter);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cause parser to parse input from given URL
|
* Cause parser to parse input from given URL
|
||||||
* @update gess5/11/98
|
* @update gess5/11/98
|
||||||
@@ -471,7 +467,6 @@ protected:
|
|||||||
nsIRunnable* mContinueEvent; // weak ref
|
nsIRunnable* mContinueEvent; // weak ref
|
||||||
nsRefPtr<nsSpeculativeScriptThread> mSpeculativeScriptThread;
|
nsRefPtr<nsSpeculativeScriptThread> mSpeculativeScriptThread;
|
||||||
|
|
||||||
nsCOMPtr<nsIParserFilter> mParserFilter;
|
|
||||||
nsTokenAllocator mTokenAllocator;
|
nsTokenAllocator mTokenAllocator;
|
||||||
|
|
||||||
eParserCommands mCommand;
|
eParserCommands mCommand;
|
||||||
|
|||||||
Reference in New Issue
Block a user