Backing out the fix for bug 142965 inorder to fix an important issue raised in bug 183711. a=asa

This commit is contained in:
harishd%netscape.com 2002-12-07 01:48:25 +00:00
Родитель ed17bb3e6f
Коммит 9bc654e3cd
2 изменённых файлов: 14 добавлений и 16 удалений

Просмотреть файл

@ -797,14 +797,13 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
}
else if(mFlags & NS_DTD_FLAG_MISPLACED_CONTENT) {
// Included TD & TH to fix Bug# 20797
static eHTMLTags gLegalElements[] = {eHTMLTag_table, eHTMLTag_tr, eHTMLTag_td,
eHTMLTag_th, eHTMLTag_caption, eHTMLTag_colgroup,
eHTMLTag_col, eHTMLTag_tbody, eHTMLTag_thead,
eHTMLTag_tfoot};
if (theToken) {
eHTMLTags theParentTag = mBodyContext->Last();
theTag = (eHTMLTags)theToken->GetTypeID();
if (FindTagInSet(theTag,gLegalElements,sizeof(gLegalElements)/sizeof(theTag))) {
static eHTMLTags gLegalElements[]={eHTMLTag_table,eHTMLTag_thead,eHTMLTag_tbody,
eHTMLTag_tr,eHTMLTag_td,eHTMLTag_th,eHTMLTag_tfoot};
if(theToken) {
eHTMLTags theParentTag=mBodyContext->Last();
theTag=(eHTMLTags)theToken->GetTypeID();
if((FindTagInSet(theTag,gLegalElements,sizeof(gLegalElements)/sizeof(theTag))) ||
(gHTMLElements[theParentTag].CanContain(theTag)) && (theTag!=eHTMLTag_comment)) { // Added comment -> bug 40855
mFlags &= ~NS_DTD_FLAG_MISPLACED_CONTENT; // reset the state since all the misplaced tokens are about to get handled.

Просмотреть файл

@ -797,14 +797,13 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
}
else if(mFlags & NS_DTD_FLAG_MISPLACED_CONTENT) {
// Included TD & TH to fix Bug# 20797
static eHTMLTags gLegalElements[] = {eHTMLTag_table, eHTMLTag_tr, eHTMLTag_td,
eHTMLTag_th, eHTMLTag_caption, eHTMLTag_colgroup,
eHTMLTag_col, eHTMLTag_tbody, eHTMLTag_thead,
eHTMLTag_tfoot};
if (theToken) {
eHTMLTags theParentTag = mBodyContext->Last();
theTag = (eHTMLTags)theToken->GetTypeID();
if (FindTagInSet(theTag,gLegalElements,sizeof(gLegalElements)/sizeof(theTag))) {
static eHTMLTags gLegalElements[]={eHTMLTag_table,eHTMLTag_thead,eHTMLTag_tbody,
eHTMLTag_tr,eHTMLTag_td,eHTMLTag_th,eHTMLTag_tfoot};
if(theToken) {
eHTMLTags theParentTag=mBodyContext->Last();
theTag=(eHTMLTags)theToken->GetTypeID();
if((FindTagInSet(theTag,gLegalElements,sizeof(gLegalElements)/sizeof(theTag))) ||
(gHTMLElements[theParentTag].CanContain(theTag)) && (theTag!=eHTMLTag_comment)) { // Added comment -> bug 40855
mFlags &= ~NS_DTD_FLAG_MISPLACED_CONTENT; // reset the state since all the misplaced tokens are about to get handled.