fixed deficiency in table

git-svn-id: svn://10.0.0.236/trunk@19147 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-02-01 06:31:30 +00:00
parent 64d0c89c72
commit b04efd48dc
4 changed files with 38 additions and 6 deletions

View File

@@ -1205,7 +1205,22 @@ nsresult CNavDTD::HandleEntityToken(CToken* aToken) {
nsresult CNavDTD::HandleCommentToken(CToken* aToken) {
NS_PRECONDITION(0!=aToken,kNullToken);
nsCParserNode aNode((CHTMLToken*)aToken,mLineNumber);
nsresult result=(mSink) ? mSink->AddComment(aNode) : NS_OK;
// You may find this hard to beleive, but this has to be here
// so that the TBODY doesnt die when it sees a comment.
// This case occurs on WWW.CREAF.COM
eHTMLTags theTag=mBodyContext->mTags.Last();
nsresult result=NS_OK;
switch(theTag) {
case eHTMLTag_table:
case eHTMLTag_tr:
case eHTMLTag_tbody:
case eHTMLTag_td:
break;
default:
result=(mSink) ? mSink->AddComment(aNode) : NS_OK;
}
return result;
}