bug 908347 - kill nsIParserNode r=mrbkap

This commit is contained in:
Trevor Saunders 2013-08-16 22:19:32 -04:00
parent 25d83bca02
commit cb32f87c7b
10 changed files with 0 additions and 256 deletions

View File

@ -6,7 +6,6 @@
#define nsIXMLContentSink_h___
#include "nsIContentSink.h"
#include "nsIParserNode.h"
#include "nsISupports.h"
class nsIDocument;

View File

@ -19,7 +19,6 @@ EXPORTS += [
'nsIFragmentContentSink.h',
'nsIHTMLContentSink.h',
'nsIParser.h',
'nsIParserNode.h',
'nsIParserService.h',
'nsITokenizer.h',
'nsParserBase.h',

View File

@ -49,7 +49,6 @@
* NOTE: I haven't figured out how sub-documents (non-frames)
* are going to be handled. Stay tuned.
*/
#include "nsIParserNode.h"
#include "nsIContentSink.h"
#include "nsHTMLTags.h"
@ -76,7 +75,6 @@ public:
* This method is used to open a generic container in the sink.
*
* @update 4/1/98 gess
* @param nsIParserNode reference to parser node interface
*/
NS_IMETHOD OpenContainer(nsHTMLTag aNodeType) = 0;

View File

@ -1,78 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* MODULE NOTES:
* @update gess 4/1/98
*
* This class is defines the basic interface between the
* parser and the content sink. The parser will iterate
* over the collection of tokens that it sees from the
* tokenizer, coverting each related "group" into one of
* these. This object gets passed to the sink, and is
* then immediately reused.
*
* If you want to hang onto one of these, you should
* make your own copy.
*
*/
#ifndef NS_IPARSERNODE__
#define NS_IPARSERNODE__
#include "nsStringGlue.h"
class nsIAtom;
/**
* Parser nodes are the unit of exchange between the
* parser and the content sink. Nodes offer access to
* the current token, its attributes, and its skipped-
* content if applicable.
*
* @update gess 3/25/98
*/
class nsIParserNode {
public:
/**
* Retrieve the type of the parser node.
* @update gess5/11/98
* @return node type.
*/
virtual int32_t GetNodeType() const =0;
/**
* Retrieve token type of parser node
* @update gess5/11/98
* @return token type
*/
virtual int32_t GetTokenType() const =0;
/**
* Retrieve the number of attributes in this node.
* @update gess5/11/98
* @return count of attributes (may be 0)
*/
virtual int32_t GetAttributeCount() const =0;
/**
* Retrieve the key (of key/value pair) at given index
* @update gess5/11/98
* @param anIndex is the index of the key you want
* @return string containing key.
*/
virtual const nsAString& GetKeyAt(uint32_t anIndex) const = 0;
/**
* Retrieve the value (of key/value pair) at given index
* @update gess5/11/98
* @param anIndex is the index of the value you want
* @return string containing value.
*/
virtual const nsAString& GetValueAt(uint32_t anIndex) const = 0;
};
#endif

View File

@ -11,7 +11,6 @@
#include "nsHTMLTags.h"
class nsIParser;
class nsIParserNode;
#define NS_PARSERSERVICE_CONTRACTID "@mozilla.org/parser/parser-service;1"

View File

@ -11,7 +11,6 @@
#include "nsIParser.h"
#include "CNavDTD.h"
#include "nsIHTMLContentSink.h"
#include "nsParserNode.h"
NS_IMPL_ISUPPORTS1(CNavDTD, nsIDTD);

View File

@ -17,7 +17,6 @@ CPP_SOURCES += [
'nsParser.cpp',
'nsParserModule.cpp',
'nsParserMsgUtils.cpp',
'nsParserNode.cpp',
'nsParserService.cpp',
'nsScanner.cpp',
'nsScannerString.cpp',

View File

@ -43,7 +43,6 @@
#include "nsIParser.h"
#include "nsDeque.h"
#include "nsParserNode.h"
#include "nsIURL.h"
#include "CParserContext.h"
#include "nsParserCIID.h"

View File

@ -1,102 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsParserNode.h"
#include "nsToken.h"
/**
* Constructor
*
* @update gess 3/25/98
* @param aToken -- token to init internal token
* @return
*/
nsParserNode::nsParserNode(eHTMLTags aTag)
: mTag(aTag)
{
}
/**
* destructor
* NOTE: We intentionally DON'T recycle mToken here.
* It may get cached for use elsewhere
* @update gess 3/25/98
* @param
* @return
*/
nsParserNode::~nsParserNode() {
}
/**
* Get node type, meaning, get the tag type of the
* underlying token
*
* @update gess 3/25/98
* @param
* @return int value that represents tag type
*/
int32_t
nsParserNode::GetNodeType(void) const
{
return mTag;
}
/**
* Gets the token type, which corresponds to a value from
* eHTMLTokens_xxx.
*
* @update gess 3/25/98
* @param
* @return
*/
int32_t
nsParserNode::GetTokenType(void) const
{
return eToken_start;
}
/**
* Retrieve the number of attributes on this node
*
* @update gess 3/25/98
* @param
* @return int -- representing attribute count
*/
int32_t
nsParserNode::GetAttributeCount() const
{
return 0;
}
/**
* Retrieve the string rep of the attribute key at the
* given index.
*
* @update gess 3/25/98
* @param anIndex-- offset of attribute to retrieve
* @return string rep of given attribute text key
*/
const nsAString&
nsParserNode::GetKeyAt(uint32_t anIndex) const
{
return EmptyString();
}
/**
* Retrieve the string rep of the attribute at given offset
*
* @update gess 3/25/98
* @param anIndex-- offset of attribute to retrieve
* @return string rep of given attribute text value
*/
const nsAString&
nsParserNode::GetValueAt(uint32_t anIndex) const
{
return EmptyString();
}

View File

@ -1,68 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef NS_PARSERNODE__
#define NS_PARSERNODE__
#include "nscore.h"
#include "nsIParserNode.h"
#include "nsHTMLTags.h"
class nsParserNode : public nsIParserNode
{
public:
/**
* Constructor
*/
nsParserNode(eHTMLTags aTag);
/**
* Destructor
*/
virtual ~nsParserNode();
/**
* Retrieve the type of the parser node.
* @return node type.
*/
virtual int32_t GetNodeType() const;
/**
* Retrieve token type of parser node
* @return token type
*/
virtual int32_t GetTokenType() const;
//***************************************
//methods for accessing key/value pairs
//***************************************
/**
* Retrieve the number of attributes in this node.
* @return 0
*/
virtual int32_t GetAttributeCount() const;
/**
* Retrieve the key (of key/value pair) at given index
* @param anIndex is the index of the key you want
* @return string containing key.
*/
virtual const nsAString& GetKeyAt(uint32_t anIndex) const;
/**
* Retrieve the value (of key/value pair) at given index
* @update gess5/11/98
* @param anIndex is the index of the value you want
* @return string containing value.
*/
virtual const nsAString& GetValueAt(uint32_t anIndex) const;
private:
eHTMLTags mTag;
};
#endif