mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 720124 - Remove dead code from HTMLContentSink: AddDocTypeDecl; r=hsivonen
This commit is contained in:
parent
437f03c00c
commit
4d51def3be
@ -316,12 +316,6 @@ mozSanitizingHTMLSerializer::AddLeaf(const nsIParserNode& aNode)
|
||||
return DoAddLeaf(type, text);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozSanitizingHTMLSerializer::AddDocTypeDecl(const nsIParserNode& aNode)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozSanitizingHTMLSerializer::SetDocumentCharset(nsACString& aCharset)
|
||||
{
|
||||
|
@ -110,7 +110,6 @@ public:
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode)
|
||||
{ return NS_OK; }
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode);
|
||||
virtual void FlushPendingNotifications(mozFlushType aType) { }
|
||||
NS_IMETHOD SetDocumentCharset(nsACString& aCharset);
|
||||
virtual nsISupports *GetTarget() { return nsnull; }
|
||||
|
@ -110,7 +110,6 @@ public:
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode) { return NS_OK; }
|
||||
virtual void FlushPendingNotifications(mozFlushType aType) { }
|
||||
NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
|
||||
virtual nsISupports *GetTarget() { return nsnull; }
|
||||
|
@ -204,7 +204,6 @@ public:
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode);
|
||||
NS_IMETHOD DidProcessTokens(void);
|
||||
NS_IMETHOD WillProcessAToken(void);
|
||||
NS_IMETHOD DidProcessAToken(void);
|
||||
@ -2109,18 +2108,6 @@ HTMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode)
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This gets called by the parser when it encounters
|
||||
* a DOCTYPE declaration in the HTML document.
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::AddDocTypeDecl(const nsIParserNode& aNode)
|
||||
{
|
||||
MOZ_NOT_REACHED("Must not use HTMLContentSink for doctypes.");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::DidProcessTokens(void)
|
||||
{
|
||||
|
@ -83,8 +83,8 @@
|
||||
#include "nsHTMLTags.h"
|
||||
|
||||
#define NS_IHTML_CONTENT_SINK_IID \
|
||||
{ 0x44b5a4f4, 0x01f7, 0x4116, \
|
||||
{ 0xb5, 0xa5, 0x56, 0x4d, 0x64, 0x0b, 0x68, 0x1f } }
|
||||
{ 0xa3aad227, 0xe137, 0x407c, \
|
||||
{ 0xa4, 0xa0, 0x9e, 0x23, 0xb6, 0x38, 0xf3, 0x42 } }
|
||||
|
||||
#define MAX_REFLOW_DEPTH 200
|
||||
|
||||
@ -205,16 +205,6 @@ public:
|
||||
*/
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) = 0;
|
||||
|
||||
/**
|
||||
* This method is called by the parser when it encounters
|
||||
* a document type declaration.
|
||||
*
|
||||
* XXX Should the parser also parse the internal subset?
|
||||
*
|
||||
* @param nsIParserNode reference to parser node interface
|
||||
*/
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode) = 0;
|
||||
|
||||
/**
|
||||
* Call this method to determnine if a FORM is on the sink's stack
|
||||
*
|
||||
|
@ -1987,15 +1987,7 @@ CNavDTD::HandleDocTypeDeclToken(CToken* aToken)
|
||||
// Now remove "<!" from the begining
|
||||
docTypeStr.Cut(0, 2);
|
||||
theToken->SetStringValue(docTypeStr);
|
||||
|
||||
nsCParserNode* theNode = mNodeAllocator.CreateNode(aToken, mTokenAllocator);
|
||||
NS_ENSURE_TRUE(theNode, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsresult result = mSink ? mSink->AddDocTypeDecl(*theNode) : NS_OK;
|
||||
|
||||
IF_FREE(theNode, &mNodeAllocator);
|
||||
|
||||
return result;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -241,29 +241,6 @@ nsLoggingSink::AddProcessingInstruction(const nsIParserNode& aNode){
|
||||
return theResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* This gets called by the parser when it encounters
|
||||
* a DOCTYPE declaration in the HTML document.
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLoggingSink::AddDocTypeDecl(const nsIParserNode& aNode) {
|
||||
|
||||
#ifdef VERBOSE_DEBUG
|
||||
DebugDump("<",aNode.GetText(),(mNodeStackPos)*2);
|
||||
#endif
|
||||
|
||||
nsresult theResult=NS_OK;
|
||||
|
||||
//then proxy the call to the real sink if you have one.
|
||||
if(mSink) {
|
||||
theResult=mSink->AddDocTypeDecl(aNode);
|
||||
}
|
||||
|
||||
return theResult;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This gets called by the parser when you want to add
|
||||
* a comment node to the current container in the content
|
||||
|
@ -71,7 +71,6 @@ public:
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode);
|
||||
virtual void FlushPendingNotifications(mozFlushType aType) { }
|
||||
NS_IMETHOD SetDocumentCharset(nsACString& aCharset) { return NS_OK; }
|
||||
virtual nsISupports *GetTarget() { return nsnull; }
|
||||
|
@ -374,7 +374,6 @@ public:
|
||||
NS_IMETHOD AddLeaf(const nsIParserNode& aNode);
|
||||
NS_IMETHOD AddComment(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD AddProcessingInstruction(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD AddDocTypeDecl(const nsIParserNode& aNode) { return NS_OK; }
|
||||
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode) { return NS_OK; }
|
||||
NS_IMETHOD_(bool) IsFormOnStack() { return false; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user