diff --git a/htmlparser/src/COtherDTD.cpp b/htmlparser/src/COtherDTD.cpp index bf766038861d..dc465780c9ec 100644 --- a/htmlparser/src/COtherDTD.cpp +++ b/htmlparser/src/COtherDTD.cpp @@ -606,8 +606,8 @@ nsresult COtherDTD::HandleToken(CToken* aToken,nsIParser* aParser){ if(aToken) { CHTMLToken* theToken= (CHTMLToken*)(aToken); eHTMLTokenTypes theType=eHTMLTokenTypes(theToken->GetTokenType()); - eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID(); - PRBool execSkipContent=PR_FALSE; +// eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID(); +// PRBool execSkipContent=PR_FALSE; theToken->mUseCount=0; //assume every token coming into this system needs recycling. @@ -725,10 +725,10 @@ void WriteTokenToLog(CToken* aToken) { */ nsresult COtherDTD::WillHandleStartTag(CToken* aToken,eHTMLTags aTag,nsCParserNode& aNode){ nsresult result=NS_OK; - PRInt32 theAttrCount = aNode.GetAttributeCount(); //first let's see if there's some skipped content to deal with... #if 0 + PRInt32 theAttrCount = aNode.GetAttributeCount(); if(*gElementTable->mElements[aTag].mSkipTarget) { result=CollectSkippedContent(aNode,theAttrCount); } @@ -888,7 +888,7 @@ nsresult COtherDTD::HandleEndToken(CToken* aToken) { case eHTMLTag_body: //we intentionally don't let the user close HTML or BODY case eHTMLTag_html: break; - + case eHTMLTag_script: mHasOpenScript=PR_FALSE; @@ -918,7 +918,7 @@ nsresult COtherDTD::HandleEntityToken(CToken* aToken) { NS_PRECONDITION(0!=aToken,kNullToken); nsresult result=NS_OK; - eHTMLTags theParentTag=mBodyContext->Last(); +// eHTMLTags theParentTag=mBodyContext->Last(); nsCParserNode* theNode=CreateNode(); if(theNode) { @@ -1786,7 +1786,7 @@ nsresult COtherDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool while(mBodyContext->GetCount()>anIndex) { - eHTMLTags theTag=mBodyContext->Last(); +// eHTMLTags theTag=mBodyContext->Last(); nsEntryStack *theChildStyleStack=0; nsCParserNode *theNode=(nsCParserNode*)mBodyContext->Pop(theChildStyleStack); diff --git a/htmlparser/src/COtherElements.h b/htmlparser/src/COtherElements.h index 2e919a713c9a..2f1a2f5547ba 100644 --- a/htmlparser/src/COtherElements.h +++ b/htmlparser/src/COtherElements.h @@ -751,6 +751,9 @@ public: CTextContainer::Initialize(*this,aTag); } + virtual ~CTextContainer() { + } + virtual nsresult HandleStartToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLContentSink* aSink) { nsresult result=NS_OK; @@ -1424,7 +1427,6 @@ void CElementTable::DebugDumpGroups(CElement* aTag){ printf("block inline "); } else { - PRBool done=PR_FALSE; if (aTag->mContainsGroups.mBits.mBlockEntity) { printf("blockEntity "); @@ -1523,7 +1525,7 @@ void CElementTable::DebugDumpContainment(const char* aTitle){ printf("==================================================\n"); printf("%s\n",aTitle); printf("==================================================\n"); - int i,j=0; + int i=0; for(i=1;iLast(); - CElement* theParent=gElementTable->mElements[theParentTag]; + theParent=gElementTable->mElements[theParentTag]; return theParent->HandleStartToken(aNode,aTag,aContext,aSink); } else return result; @@ -1722,7 +1724,7 @@ static nsresult CloseContainer(eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLCont nsresult CElement::HandleEndToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLContentSink* aSink) { nsresult result=NS_OK; - CElement* theCloser=gElementTable->mElements[aTag]; +// CElement* theCloser=gElementTable->mElements[aTag]; if(mTag==aTag) { result=CloseContainer(aTag,aContext,aSink); diff --git a/parser/htmlparser/src/COtherDTD.cpp b/parser/htmlparser/src/COtherDTD.cpp index bf766038861d..dc465780c9ec 100644 --- a/parser/htmlparser/src/COtherDTD.cpp +++ b/parser/htmlparser/src/COtherDTD.cpp @@ -606,8 +606,8 @@ nsresult COtherDTD::HandleToken(CToken* aToken,nsIParser* aParser){ if(aToken) { CHTMLToken* theToken= (CHTMLToken*)(aToken); eHTMLTokenTypes theType=eHTMLTokenTypes(theToken->GetTokenType()); - eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID(); - PRBool execSkipContent=PR_FALSE; +// eHTMLTags theTag=(eHTMLTags)theToken->GetTypeID(); +// PRBool execSkipContent=PR_FALSE; theToken->mUseCount=0; //assume every token coming into this system needs recycling. @@ -725,10 +725,10 @@ void WriteTokenToLog(CToken* aToken) { */ nsresult COtherDTD::WillHandleStartTag(CToken* aToken,eHTMLTags aTag,nsCParserNode& aNode){ nsresult result=NS_OK; - PRInt32 theAttrCount = aNode.GetAttributeCount(); //first let's see if there's some skipped content to deal with... #if 0 + PRInt32 theAttrCount = aNode.GetAttributeCount(); if(*gElementTable->mElements[aTag].mSkipTarget) { result=CollectSkippedContent(aNode,theAttrCount); } @@ -888,7 +888,7 @@ nsresult COtherDTD::HandleEndToken(CToken* aToken) { case eHTMLTag_body: //we intentionally don't let the user close HTML or BODY case eHTMLTag_html: break; - + case eHTMLTag_script: mHasOpenScript=PR_FALSE; @@ -918,7 +918,7 @@ nsresult COtherDTD::HandleEntityToken(CToken* aToken) { NS_PRECONDITION(0!=aToken,kNullToken); nsresult result=NS_OK; - eHTMLTags theParentTag=mBodyContext->Last(); +// eHTMLTags theParentTag=mBodyContext->Last(); nsCParserNode* theNode=CreateNode(); if(theNode) { @@ -1786,7 +1786,7 @@ nsresult COtherDTD::CloseContainersTo(PRInt32 anIndex,eHTMLTags aTarget, PRBool while(mBodyContext->GetCount()>anIndex) { - eHTMLTags theTag=mBodyContext->Last(); +// eHTMLTags theTag=mBodyContext->Last(); nsEntryStack *theChildStyleStack=0; nsCParserNode *theNode=(nsCParserNode*)mBodyContext->Pop(theChildStyleStack); diff --git a/parser/htmlparser/src/COtherElements.h b/parser/htmlparser/src/COtherElements.h index 2e919a713c9a..2f1a2f5547ba 100644 --- a/parser/htmlparser/src/COtherElements.h +++ b/parser/htmlparser/src/COtherElements.h @@ -751,6 +751,9 @@ public: CTextContainer::Initialize(*this,aTag); } + virtual ~CTextContainer() { + } + virtual nsresult HandleStartToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLContentSink* aSink) { nsresult result=NS_OK; @@ -1424,7 +1427,6 @@ void CElementTable::DebugDumpGroups(CElement* aTag){ printf("block inline "); } else { - PRBool done=PR_FALSE; if (aTag->mContainsGroups.mBits.mBlockEntity) { printf("blockEntity "); @@ -1523,7 +1525,7 @@ void CElementTable::DebugDumpContainment(const char* aTitle){ printf("==================================================\n"); printf("%s\n",aTitle); printf("==================================================\n"); - int i,j=0; + int i=0; for(i=1;iLast(); - CElement* theParent=gElementTable->mElements[theParentTag]; + theParent=gElementTable->mElements[theParentTag]; return theParent->HandleStartToken(aNode,aTag,aContext,aSink); } else return result; @@ -1722,7 +1724,7 @@ static nsresult CloseContainer(eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLCont nsresult CElement::HandleEndToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDContext* aContext,nsIHTMLContentSink* aSink) { nsresult result=NS_OK; - CElement* theCloser=gElementTable->mElements[aTag]; +// CElement* theCloser=gElementTable->mElements[aTag]; if(mTag==aTag) { result=CloseContainer(aTag,aContext,aSink);