зеркало из https://github.com/mozilla/pjs.git
52361 - parser shouldn't generate synthetic doctype because
it affects SCRIPTs r=jst
This commit is contained in:
Родитель
274bc5e8c8
Коммит
b64aadd5de
|
@ -537,15 +537,6 @@ nsresult CNavDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIParse
|
||||||
result=HandleToken(theEndToken,mParser);
|
result=HandleToken(theEndToken,mParser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!mBodyContext->mFlags.mHadDocTypeDecl) {
|
|
||||||
CToken* theDocTypeToken=mTokenAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_markupDecl);
|
|
||||||
if(theDocTypeToken) {
|
|
||||||
nsAutoString theDocTypeStr;
|
|
||||||
theDocTypeStr.AssignWithConversion("<!DOCTYPE \"-//W3C//DTD HTML 3.2 Final//EN\">");
|
|
||||||
theDocTypeToken->Reinitialize(eHTMLTag_markupDecl,theDocTypeStr);
|
|
||||||
result=HandleToken(theDocTypeToken,mParser);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(result==NS_OK) {
|
if(result==NS_OK) {
|
||||||
eHTMLTags theTarget;
|
eHTMLTags theTarget;
|
||||||
|
|
||||||
|
@ -2125,10 +2116,6 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){
|
||||||
|
|
||||||
nsresult result=NS_OK;
|
nsresult result=NS_OK;
|
||||||
|
|
||||||
if(mBodyContext) {
|
|
||||||
mBodyContext->mFlags.mHadDocTypeDecl=PR_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef RICKG_DEBUG
|
#ifdef RICKG_DEBUG
|
||||||
WriteTokenToLog(aToken);
|
WriteTokenToLog(aToken);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -320,7 +320,6 @@ public:
|
||||||
PRUint8 mHadFrameset:1;
|
PRUint8 mHadFrameset:1;
|
||||||
PRUint8 mHasOpenHead:1;
|
PRUint8 mHasOpenHead:1;
|
||||||
PRUint8 mTransitional:1;
|
PRUint8 mTransitional:1;
|
||||||
PRUint8 mHadDocTypeDecl:1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -537,15 +537,6 @@ nsresult CNavDTD::DidBuildModel(nsresult anErrorCode,PRBool aNotifySink,nsIParse
|
||||||
result=HandleToken(theEndToken,mParser);
|
result=HandleToken(theEndToken,mParser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!mBodyContext->mFlags.mHadDocTypeDecl) {
|
|
||||||
CToken* theDocTypeToken=mTokenAllocator->CreateTokenOfType(eToken_doctypeDecl,eHTMLTag_markupDecl);
|
|
||||||
if(theDocTypeToken) {
|
|
||||||
nsAutoString theDocTypeStr;
|
|
||||||
theDocTypeStr.AssignWithConversion("<!DOCTYPE \"-//W3C//DTD HTML 3.2 Final//EN\">");
|
|
||||||
theDocTypeToken->Reinitialize(eHTMLTag_markupDecl,theDocTypeStr);
|
|
||||||
result=HandleToken(theDocTypeToken,mParser);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(result==NS_OK) {
|
if(result==NS_OK) {
|
||||||
eHTMLTags theTarget;
|
eHTMLTags theTarget;
|
||||||
|
|
||||||
|
@ -2125,10 +2116,6 @@ nsresult CNavDTD::HandleDocTypeDeclToken(CToken* aToken){
|
||||||
|
|
||||||
nsresult result=NS_OK;
|
nsresult result=NS_OK;
|
||||||
|
|
||||||
if(mBodyContext) {
|
|
||||||
mBodyContext->mFlags.mHadDocTypeDecl=PR_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef RICKG_DEBUG
|
#ifdef RICKG_DEBUG
|
||||||
WriteTokenToLog(aToken);
|
WriteTokenToLog(aToken);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -320,7 +320,6 @@ public:
|
||||||
PRUint8 mHadFrameset:1;
|
PRUint8 mHadFrameset:1;
|
||||||
PRUint8 mHasOpenHead:1;
|
PRUint8 mHasOpenHead:1;
|
||||||
PRUint8 mTransitional:1;
|
PRUint8 mTransitional:1;
|
||||||
PRUint8 mHadDocTypeDecl:1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
union {
|
union {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче