fixed bug 28825, 30780, 31723 plus wip for travis; r=harishd
git-svn-id: svn://10.0.0.236/trunk@64098 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -53,6 +53,12 @@ class nsString;
|
||||
class nsIURI;
|
||||
|
||||
|
||||
enum eParserCommands {
|
||||
eViewNormal,
|
||||
eViewSource,
|
||||
eViewErrors,
|
||||
};
|
||||
|
||||
enum eCRCQuality {
|
||||
eCRCGood = 0,
|
||||
eCRCFair,
|
||||
@@ -60,6 +66,13 @@ enum eCRCQuality {
|
||||
};
|
||||
|
||||
|
||||
enum eParserDocType {
|
||||
ePlainText = 0,
|
||||
eHTMLText,
|
||||
eXMLText
|
||||
};
|
||||
|
||||
|
||||
typedef enum {
|
||||
kCharsetUninitialized = 0,
|
||||
kCharsetFromWeakDocTypeDefault,
|
||||
@@ -135,6 +148,7 @@ class nsIParser : public nsISupports {
|
||||
* @return nada
|
||||
*/
|
||||
virtual void SetCommand(const char* aCommand)=0;
|
||||
virtual void SetCommand(eParserCommands aParserCommand)=0;
|
||||
|
||||
/**
|
||||
* Call this method once you've created a parser, and want to instruct it
|
||||
@@ -174,9 +188,11 @@ class nsIParser : public nsISupports {
|
||||
******************************************************************************************/
|
||||
virtual nsresult EnableParser(PRBool aState) = 0;
|
||||
virtual PRBool IsParserEnabled() = 0;
|
||||
|
||||
virtual nsresult Parse(nsIURI* aURL,nsIStreamObserver* aListener = nsnull,PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
virtual nsresult Parse(nsIInputStream& aStream, const nsString& aMimeType,PRBool aEnableVerify=PR_FALSE, void* aKey=0,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
virtual nsresult Parse(const nsString& aSourceBuffer,void* aKey,const nsString& aContentType,PRBool aEnableVerify,PRBool aLastCall,eParseMode aMode=eParseMode_autodetect) = 0;
|
||||
|
||||
virtual nsresult Terminate(void) = 0;
|
||||
|
||||
virtual PRBool IsValidFragment(const nsString& aSourceBuffer,nsITagStack& aStack,PRUint32 anInsertPos,const nsString& aContentType,eParseMode aMode=eParseMode_autodetect)=0;
|
||||
@@ -276,4 +292,6 @@ const PRUnichar kNullCh = '\0';
|
||||
#define kViewSourceCommand "view-source"
|
||||
#define kTextCSSContentType "text/css"
|
||||
#define kRTFTextContentType "text/rtf"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user