mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Make text/plain view-source use the view-source parser. Bug 124753,
r=harishd, sr=jst.
This commit is contained in:
parent
f9fef74165
commit
6baa8a23f9
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user