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
This commit is contained in:
rickg%netscape.com
1999-01-11 19:45:28 +00:00
parent 4c4c2ea13a
commit ed9e1fe3f0
2 changed files with 2 additions and 66 deletions

View File

@@ -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->mCurrentPos<e))){
mMinorIteration++;
CToken* theToken=(CToken*)mParserContext->mCurrentPos->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;
}