Adding the ablity to disable view source.

patch by dougt r=bz,sr=darin,b=199335
This commit is contained in:
timeless@mozdev.org
2003-07-30 23:57:39 +00:00
parent a2688282c0
commit 261bc22572
14 changed files with 65 additions and 21 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
}
}