Make text/plain view-source use the view-source parser. Bug 124753,

r=harishd, sr=jst.
This commit is contained in:
bzbarsky%mit.edu 2002-02-16 15:51:02 +00:00
parent f9fef74165
commit 6baa8a23f9
4 changed files with 4 additions and 24 deletions

View File

@ -326,12 +326,7 @@ CNavDTD::CanParse(CParserContext& aParserContext,
{
eAutoDetectResult result=eUnknownDetect;
if(eViewSource==aParserContext.mParserCommand) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=ePrimaryDetect;
}
}
else {
if(aParserContext.mParserCommand != eViewSource) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kHTMLTextContentType)) {
result=ePrimaryDetect;
}

View File

@ -274,12 +274,7 @@ COtherDTD::CanParse(CParserContext& aParserContext, const nsString& aBuffer,
eAutoDetectResult result=eUnknownDetect;
if(mEnableStrict) {
if(eViewSource==aParserContext.mParserCommand) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=eValidDetect;
}
}
else {
if(aParserContext.mParserCommand != eViewSource) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=eValidDetect;
}

View File

@ -326,12 +326,7 @@ CNavDTD::CanParse(CParserContext& aParserContext,
{
eAutoDetectResult result=eUnknownDetect;
if(eViewSource==aParserContext.mParserCommand) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=ePrimaryDetect;
}
}
else {
if(aParserContext.mParserCommand != eViewSource) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kHTMLTextContentType)) {
result=ePrimaryDetect;
}

View File

@ -274,12 +274,7 @@ COtherDTD::CanParse(CParserContext& aParserContext, const nsString& aBuffer,
eAutoDetectResult result=eUnknownDetect;
if(mEnableStrict) {
if(eViewSource==aParserContext.mParserCommand) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=eValidDetect;
}
}
else {
if(aParserContext.mParserCommand != eViewSource) {
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
result=eValidDetect;
}