From ed9e1fe3f0cfc8480023a7004550c155e61b0458 Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Mon, 11 Jan 1999 19:45:28 +0000 Subject: [PATCH] fixed part of style/script bug in new pasring engine git-svn-id: svn://10.0.0.236/trunk@17503 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsParser.cpp | 34 +--------------------- mozilla/parser/htmlparser/src/nsParser.cpp | 34 +--------------------- 2 files changed, 2 insertions(+), 66 deletions(-) diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index 7270fc3e6a5..bf34fa275d4 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -657,7 +657,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD) { result=Tokenize(); result=BuildModel(); - if((!mIncremental) || (eOnStop==mStreamListenerState)){ + if((!mIncremental) || ((eOnStop==mStreamListenerState) && (NS_OK==result))){ DidBuildModel(mStreamStatus); } else { @@ -701,38 +701,6 @@ nsresult nsParser::BuildModel() { result=theRootDTD->BuildModel(this); } -/* - while((NS_OK==result) && ((*mParserContext->mCurrentPosmCurrentPos->GetCurrent(); - theMarkPos=*mParserContext->mCurrentPos; - ++(*mParserContext->mCurrentPos); - result=theRootDTD->HandleToken(theToken,this); - if(mDTDVerification) - theRootDTD->Verify(kEmptyString,this); - } - - //Now it's time to recycle our used tokens. - //The current context has a deque full of them, - //and the ones that preceed currentpos are no - //longer needed. Let's recycle them. - - nsITokenRecycler* theRecycler=theRootDTD->GetTokenRecycler(); - if(theRecycler) { - nsDeque& theDeque=mParserContext->mTokenDeque; - CToken* theCurrentToken=(CToken*)mParserContext->mCurrentPos->GetCurrent(); - for(;;) { - CToken* theToken=(CToken*)theDeque.Peek(); - if(theToken && (theToken!=theCurrentToken)){ - theDeque.Pop(); - theRecycler->RecycleToken(theToken); - } - else break; - } - mParserContext->mCurrentPos->First(); - } - */ - return result; } diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 7270fc3e6a5..bf34fa275d4 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -657,7 +657,7 @@ nsresult nsParser::ResumeParse(nsIDTD* aDefaultDTD) { result=Tokenize(); result=BuildModel(); - if((!mIncremental) || (eOnStop==mStreamListenerState)){ + if((!mIncremental) || ((eOnStop==mStreamListenerState) && (NS_OK==result))){ DidBuildModel(mStreamStatus); } else { @@ -701,38 +701,6 @@ nsresult nsParser::BuildModel() { result=theRootDTD->BuildModel(this); } -/* - while((NS_OK==result) && ((*mParserContext->mCurrentPosmCurrentPos->GetCurrent(); - theMarkPos=*mParserContext->mCurrentPos; - ++(*mParserContext->mCurrentPos); - result=theRootDTD->HandleToken(theToken,this); - if(mDTDVerification) - theRootDTD->Verify(kEmptyString,this); - } - - //Now it's time to recycle our used tokens. - //The current context has a deque full of them, - //and the ones that preceed currentpos are no - //longer needed. Let's recycle them. - - nsITokenRecycler* theRecycler=theRootDTD->GetTokenRecycler(); - if(theRecycler) { - nsDeque& theDeque=mParserContext->mTokenDeque; - CToken* theCurrentToken=(CToken*)mParserContext->mCurrentPos->GetCurrent(); - for(;;) { - CToken* theToken=(CToken*)theDeque.Peek(); - if(theToken && (theToken!=theCurrentToken)){ - theDeque.Pop(); - theRecycler->RecycleToken(theToken); - } - else break; - } - mParserContext->mCurrentPos->First(); - } - */ - return result; }