mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
added new EnableParser() routine for kipp; WIP
This commit is contained in:
parent
52c74ded1d
commit
631ac3f398
@ -102,6 +102,7 @@ class nsIParser : public nsISupports {
|
||||
* until you wind up being emitted to the given contentsink (which may or may not
|
||||
* be a proxy for the NGLayout content model).
|
||||
******************************************************************************************/
|
||||
virtual PRBool EnableParser(PRBool aState) = 0;
|
||||
virtual PRInt32 Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
virtual PRInt32 Parse(fstream& aStream,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
virtual PRInt32 Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
|
@ -439,6 +439,20 @@ CParserContext* nsParser::PopContext() {
|
||||
return oldContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this when you want control whether or not the parser will parse
|
||||
* and tokenize input (TRUE), or whether it just caches input to be
|
||||
* parsed later (FALSE).
|
||||
*
|
||||
* @update gess 9/1/98
|
||||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
PRBool nsParser::EnableParser(PRBool aState){
|
||||
mParserEnabled=aState;
|
||||
return mParserEnabled;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the main controlling routine in the parsing process.
|
||||
@ -529,6 +543,7 @@ PRInt32 nsParser::Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aVeri
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This routine is called to cause the parser to continue
|
||||
* parsing it's underling stream. This call allows the
|
||||
|
@ -144,6 +144,18 @@ friend class CTokenHandler;
|
||||
*/
|
||||
virtual PRInt32 Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aEnableVerify=PR_FALSE);
|
||||
|
||||
|
||||
/**
|
||||
* Call this when you want control whether or not the parser will parse
|
||||
* and tokenize input (TRUE), or whether it just caches input to be
|
||||
* parsed later (FALSE).
|
||||
*
|
||||
* @update gess 9/1/98
|
||||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
virtual PRBool EnableParser(PRBool aState);
|
||||
|
||||
/**
|
||||
* This method gets called (automatically) during incremental parsing
|
||||
* @update gess5/11/98
|
||||
@ -284,6 +296,7 @@ protected:
|
||||
nsIContentSink* mSink;
|
||||
nsIParserFilter* mParserFilter;
|
||||
PRBool mDTDVerification;
|
||||
PRBool mParserEnabled;
|
||||
};
|
||||
|
||||
|
||||
|
@ -102,6 +102,7 @@ class nsIParser : public nsISupports {
|
||||
* until you wind up being emitted to the given contentsink (which may or may not
|
||||
* be a proxy for the NGLayout content model).
|
||||
******************************************************************************************/
|
||||
virtual PRBool EnableParser(PRBool aState) = 0;
|
||||
virtual PRInt32 Parse(nsIURL* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
virtual PRInt32 Parse(fstream& aStream,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
virtual PRInt32 Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aEnableVerify=PR_FALSE) = 0;
|
||||
|
@ -439,6 +439,20 @@ CParserContext* nsParser::PopContext() {
|
||||
return oldContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this when you want control whether or not the parser will parse
|
||||
* and tokenize input (TRUE), or whether it just caches input to be
|
||||
* parsed later (FALSE).
|
||||
*
|
||||
* @update gess 9/1/98
|
||||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
PRBool nsParser::EnableParser(PRBool aState){
|
||||
mParserEnabled=aState;
|
||||
return mParserEnabled;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the main controlling routine in the parsing process.
|
||||
@ -529,6 +543,7 @@ PRInt32 nsParser::Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aVeri
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This routine is called to cause the parser to continue
|
||||
* parsing it's underling stream. This call allows the
|
||||
|
@ -144,6 +144,18 @@ friend class CTokenHandler;
|
||||
*/
|
||||
virtual PRInt32 Parse(nsString& aSourceBuffer,PRBool anHTMLString,PRBool aEnableVerify=PR_FALSE);
|
||||
|
||||
|
||||
/**
|
||||
* Call this when you want control whether or not the parser will parse
|
||||
* and tokenize input (TRUE), or whether it just caches input to be
|
||||
* parsed later (FALSE).
|
||||
*
|
||||
* @update gess 9/1/98
|
||||
* @param aState determines whether we parse/tokenize or just cache.
|
||||
* @return current state
|
||||
*/
|
||||
virtual PRBool EnableParser(PRBool aState);
|
||||
|
||||
/**
|
||||
* This method gets called (automatically) during incremental parsing
|
||||
* @update gess5/11/98
|
||||
@ -284,6 +296,7 @@ protected:
|
||||
nsIContentSink* mSink;
|
||||
nsIParserFilter* mParserFilter;
|
||||
PRBool mDTDVerification;
|
||||
PRBool mParserEnabled;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user