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

This commit is contained in:
harishd%netscape.com 2002-02-16 01:36:50 +00:00
Родитель 23c8dde806
Коммит 804e3adf1a
2 изменённых файлов: 16 добавлений и 8 удалений

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

@ -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);
NS_ENSURE_SUCCESS(result, result);
mBodyContext->mContextTopIndex = -1;
if(NS_FAILED(result)) {
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);

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

@ -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);
NS_ENSURE_SUCCESS(result, result);
mBodyContext->mContextTopIndex = -1;
if(NS_FAILED(result)) {
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);