Adding the ablity to disable view source. r=bz,sr=darin,b=199335

This commit is contained in:
dougt@meer.net
2003-07-30 02:39:05 +00:00
parent 513a87f384
commit f50afca4fc
13 changed files with 65 additions and 20 deletions

View File

@@ -48,7 +48,6 @@
#include "nsCRT.h"
#include "nsScanner.h"
#include "plstr.h"
#include "nsViewSourceHTML.h"
#include "nsIStringStream.h"
#include "nsIChannel.h"
#include "nsICachingChannel.h"
@@ -67,6 +66,10 @@
#include "nsIServiceManager.h"
//#define rickgdebug
#ifdef MOZ_VIEW_SOURCE
#include "nsViewSourceHTML.h"
#endif
#define NS_PARSER_FLAG_DTD_VERIFICATION 0x00000001
#define NS_PARSER_FLAG_PARSER_ENABLED 0x00000002
#define NS_PARSER_FLAG_OBSERVERS_ENABLED 0x00000004
@@ -1154,6 +1157,7 @@ FindSuitableDTD(CParserContext& aParserContext,
sharedObjects->mDTDDeque.Push(theDTD);
sharedObjects->mHasXMLDTD = PR_TRUE;
}
#ifdef MOZ_VIEW_SOURCE
else if (!sharedObjects->mHasViewSourceDTD) {
rv = NS_NewViewSourceHTML(&theDTD); //do this so all non-html files can be viewed...
NS_ENSURE_SUCCESS(rv, rv);
@@ -1161,6 +1165,7 @@ FindSuitableDTD(CParserContext& aParserContext,
sharedObjects->mDTDDeque.Push(theDTD);
sharedObjects->mHasViewSourceDTD = PR_TRUE;
}
#endif
}
}