From b64aadd5deb4762a09a809f894ff17f94e2835f7 Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Thu, 14 Sep 2000 19:02:13 +0000 Subject: [PATCH] 52361 - parser shouldn't generate synthetic doctype because it affects SCRIPTs r=jst --- htmlparser/src/CNavDTD.cpp | 13 ------------- htmlparser/src/nsDTDUtils.h | 1 - parser/htmlparser/src/CNavDTD.cpp | 13 ------------- parser/htmlparser/src/nsDTDUtils.h | 1 - 4 files changed, 28 deletions(-) diff --git a/htmlparser/src/CNavDTD.cpp b/htmlparser/src/CNavDTD.cpp index 5f45d3892a8..274206696ab 100644 --- a/htmlparser/src/CNavDTD.cpp +++ b/htmlparser/src/CNavDTD.cpp @@ -537,15 +537,6 @@ nsresult CNavDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIParse result=HandleToken(theEndToken,mParser); } } - if(!mBodyContext->mFlags.mHadDocTypeDecl) { - CToken* theDocTypeToken=mTokenAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_markupDecl); - if(theDocTypeToken) { - nsAutoString theDocTypeStr; - theDocTypeStr.AssignWithConversion(""); - theDocTypeToken->Reinitialize(eHTMLTag_markupDecl,theDocTypeStr); - result=HandleToken(theDocTypeToken,mParser); - } - } if(result==NS_OK) { eHTMLTags theTarget; @@ -2125,10 +2116,6 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){ nsresult result=NS_OK; - if(mBodyContext) { - mBodyContext->mFlags.mHadDocTypeDecl=PR_TRUE; - } - #ifdef RICKG_DEBUG WriteTokenToLog(aToken); #endif diff --git a/htmlparser/src/nsDTDUtils.h b/htmlparser/src/nsDTDUtils.h index 92b0c93d70c..05e71ceb2bb 100644 --- a/htmlparser/src/nsDTDUtils.h +++ b/htmlparser/src/nsDTDUtils.h @@ -320,7 +320,6 @@ public: PRUint8 mHadFrameset:1; PRUint8 mHasOpenHead:1; PRUint8 mTransitional:1; - PRUint8 mHadDocTypeDecl:1; }; union { diff --git a/parser/htmlparser/src/CNavDTD.cpp b/parser/htmlparser/src/CNavDTD.cpp index 5f45d3892a8..274206696ab 100644 --- a/parser/htmlparser/src/CNavDTD.cpp +++ b/parser/htmlparser/src/CNavDTD.cpp @@ -537,15 +537,6 @@ nsresult CNavDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIParse result=HandleToken(theEndToken,mParser); } } - if(!mBodyContext->mFlags.mHadDocTypeDecl) { - CToken* theDocTypeToken=mTokenAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_markupDecl); - if(theDocTypeToken) { - nsAutoString theDocTypeStr; - theDocTypeStr.AssignWithConversion(""); - theDocTypeToken->Reinitialize(eHTMLTag_markupDecl,theDocTypeStr); - result=HandleToken(theDocTypeToken,mParser); - } - } if(result==NS_OK) { eHTMLTags theTarget; @@ -2125,10 +2116,6 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){ nsresult result=NS_OK; - if(mBodyContext) { - mBodyContext->mFlags.mHadDocTypeDecl=PR_TRUE; - } - #ifdef RICKG_DEBUG WriteTokenToLog(aToken); #endif diff --git a/parser/htmlparser/src/nsDTDUtils.h b/parser/htmlparser/src/nsDTDUtils.h index 92b0c93d70c..05e71ceb2bb 100644 --- a/parser/htmlparser/src/nsDTDUtils.h +++ b/parser/htmlparser/src/nsDTDUtils.h @@ -320,7 +320,6 @@ public: PRUint8 mHadFrameset:1; PRUint8 mHasOpenHead:1; PRUint8 mTransitional:1; - PRUint8 mHadDocTypeDecl:1; }; union {