Fixing hang - If misplaced table content turns out to be skipped content then we need to make sure that the rest of the table content belongs to the skipped content until we reach the matching end-skipped-content-tag. b=124788, r=heikki, sr=jst

git-svn-id: svn://10.0.0.236/trunk@114636 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2002-02-16 01:36:50 +00:00
parent fddd101b7f
commit e951f0eacd
2 changed files with 16 additions and 8 deletions

View File

@@ -801,13 +801,17 @@ nsresult CNavDTD::HandleToken(CToken* aToken,nsIParser* aParser){
(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.
result=HandleSavedTokens(mBodyContext->mContextTopIndex);
mBodyContext->mContextTopIndex=-1;
result = HandleSavedTokens(mBodyContext->mContextTopIndex);
NS_ENSURE_SUCCESS(result, result);
if(NS_FAILED(result)) {
mBodyContext->mContextTopIndex = -1;
if (mSkipTarget) {
mSkippedContent.Push(theToken);
return result;
}
//falling through intentionally,i.e., handle the token that is willing to be the child of the current parent.
// Fall through if the skipped content collection is |not| in progress - bug 124788
}
else {
mMisplacedContent.Push(theToken);