зеркало из https://github.com/mozilla/gecko-dev.git
41868 and 45994: Expose CreateComparibleDTD. r=Harishd
This commit is contained in:
Родитель
dce3172348
Коммит
dcde36cf5d
|
@ -248,6 +248,23 @@ class nsIParser : public nsISupports {
|
|||
*/
|
||||
virtual nsDTDMode GetParseMode(void)=0;
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
NS_IMETHOD CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown)=0;
|
||||
};
|
||||
|
||||
/* ===========================================================*
|
||||
|
|
|
@ -1089,11 +1089,11 @@ PRBool FindSuitableDTD( CParserContext& aParserContext,nsString& aBuffer) {
|
|||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
nsresult nsParser::CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType,
|
||||
nsDTDMode aDTDMode)
|
||||
NS_IMETHODIMP nsParser::CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType,
|
||||
nsDTDMode aDTDMode)
|
||||
{
|
||||
nsresult result=NS_OK;
|
||||
const nsCID* theDTDClassID=0;
|
||||
|
|
|
@ -302,6 +302,23 @@ CLASS_EXPORT_HTMLPARS nsParser : public nsIParser,
|
|||
NS_IMETHOD GetDataFromBundle(const nsString& aKey,nsISupports** anObject);
|
||||
NS_IMETHOD SetDataIntoBundle(const nsString& aKey,nsISupports* anObject);
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
NS_IMETHOD CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -367,24 +384,6 @@ private:
|
|||
* @return TRUE if all went well
|
||||
*/
|
||||
PRBool DidTokenize(PRBool aIsFinalChunk = PR_FALSE);
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
static nsresult CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown);
|
||||
protected:
|
||||
//*********************************************
|
||||
// And now, some data members...
|
||||
|
|
|
@ -248,6 +248,23 @@ class nsIParser : public nsISupports {
|
|||
*/
|
||||
virtual nsDTDMode GetParseMode(void)=0;
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
NS_IMETHOD CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown)=0;
|
||||
};
|
||||
|
||||
/* ===========================================================*
|
||||
|
|
|
@ -1089,11 +1089,11 @@ PRBool FindSuitableDTD( CParserContext& aParserContext,nsString& aBuffer) {
|
|||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
nsresult nsParser::CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType,
|
||||
nsDTDMode aDTDMode)
|
||||
NS_IMETHODIMP nsParser::CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType,
|
||||
nsDTDMode aDTDMode)
|
||||
{
|
||||
nsresult result=NS_OK;
|
||||
const nsCID* theDTDClassID=0;
|
||||
|
|
|
@ -302,6 +302,23 @@ CLASS_EXPORT_HTMLPARS nsParser : public nsIParser,
|
|||
NS_IMETHOD GetDataFromBundle(const nsString& aKey,nsISupports** anObject);
|
||||
NS_IMETHOD SetDataIntoBundle(const nsString& aKey,nsISupports* anObject);
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
NS_IMETHOD CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -367,24 +384,6 @@ private:
|
|||
* @return TRUE if all went well
|
||||
*/
|
||||
PRBool DidTokenize(PRBool aIsFinalChunk = PR_FALSE);
|
||||
|
||||
/**
|
||||
* Call this method to determine a DTD for a DOCTYPE
|
||||
*
|
||||
* @update harishd 05/01/00
|
||||
* @param aDTD -- Carries the deduced ( from DOCTYPE ) DTD.
|
||||
* @param aDocTypeStr -- A doctype for which a DTD is to be selected.
|
||||
* @param aMimeType -- A mimetype for which a DTD is to be selected.
|
||||
Note: aParseMode might be required.
|
||||
* @param aCommand -- A command for which a DTD is to be selected.
|
||||
* @param aParseMode -- Used with aMimeType to choose the correct DTD.
|
||||
* @return NS_OK if succeeded else ERROR.
|
||||
*/
|
||||
static nsresult CreateCompatibleDTD(nsIDTD** aDTD,
|
||||
nsString* aDocTypeStr,
|
||||
eParserCommands aCommand,
|
||||
const nsString* aMimeType=nsnull,
|
||||
nsDTDMode aDTDMode=eDTDMode_unknown);
|
||||
protected:
|
||||
//*********************************************
|
||||
// And now, some data members...
|
||||
|
|
Загрузка…
Ссылка в новой задаче