This commit is contained in:
rickg%netscape.com 2000-04-23 14:48:51 +00:00
Родитель 49c6e161e3
Коммит f19b803314
4 изменённых файлов: 24 добавлений и 20 удалений

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

@ -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);
}
@ -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);

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

@ -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;i<eHTMLTag_text;i++){
//DebugDumpContainment(mElements[i]);
@ -1654,7 +1656,7 @@ nsresult CElement::HandleStartToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDCon
if(NS_SUCCEEDED(result)){
theParentTag=aContext->Last();
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);

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

@ -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);
}
@ -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);

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

@ -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;i<eHTMLTag_text;i++){
//DebugDumpContainment(mElements[i]);
@ -1654,7 +1656,7 @@ nsresult CElement::HandleStartToken(nsIParserNode* aNode,eHTMLTags aTag,nsDTDCon
if(NS_SUCCEEDED(result)){
theParentTag=aContext->Last();
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);