This commit is contained in:
rickg%netscape.com 2000-05-07 21:59:06 +00:00
Родитель 6750e537b7
Коммит 30c4d5f49b
6 изменённых файлов: 20 добавлений и 18 удалений

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

@ -748,7 +748,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
nsCParserNode* theNode=CreateNode(); nsCParserNode* theNode=CreateNode();
theNode->Init(aToken,mLineNumber,mTokenRecycler); theNode->Init(aToken,mLineNumber,mTokenRecycler);
eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID(); eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID();
PRInt16 attrCount=aToken->GetAttributeCount(); PRInt16 attrCount=aToken->GetAttributeCount();
eHTMLTags theParent=mBodyContext->Last(); eHTMLTags theParent=mBodyContext->Last();
@ -763,7 +763,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
PRBool theTagWasHandled=PR_FALSE; PRBool theTagWasHandled=PR_FALSE;
switch(theChildTag) { switch(theChildTag) {
case eHTMLTag_html: case eHTMLTag_html:
if(!HasOpenContainer(theChildTag)) { if(!HasOpenContainer(theChildTag)) {
mSink->OpenHTML(*theNode); mSink->OpenHTML(*theNode);

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

@ -22,7 +22,7 @@
*/ */
/** /**
* MODULE NOTES: * MODULE NOTES:
* @update gess 7/15/98 * @update gess 7/15/98
* *
* NavDTD is an implementation of the nsIDTD interface. * NavDTD is an implementation of the nsIDTD interface.

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

@ -701,17 +701,18 @@ public:
case eHTMLTag_tr: case eHTMLTag_tr:
case eHTMLTag_th: case eHTMLTag_th:
if(aContext->mTableStates && (!aContext->mTableStates->mHasTBody)) {
if(!aContext->HasOpenContainer(eHTMLTag_tbody)) {
nsCParserNode* theNode=new nsCParserNode(); nsCParserNode* theNode=new nsCParserNode();
CToken* theToken=new CStartToken(eHTMLTag_tbody); CToken* theToken=new CStartToken(eHTMLTag_tbody);
theNode->Init(theToken,0,0); //this will likely leak... theNode->Init(theToken,0,0); //this will likely leak...
result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink); result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink);
if(NS_SUCCEEDED(result)) { }
CElement *theElement=GetElement(eHTMLTag_tbody); if(NS_SUCCEEDED(result)) {
if(theElement) { CElement *theElement=GetElement(eHTMLTag_tbody);
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink); if(theElement) {
} result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
} }
} }

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

@ -748,7 +748,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
nsCParserNode* theNode=CreateNode(); nsCParserNode* theNode=CreateNode();
theNode->Init(aToken,mLineNumber,mTokenRecycler); theNode->Init(aToken,mLineNumber,mTokenRecycler);
eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID(); eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID();
PRInt16 attrCount=aToken->GetAttributeCount(); PRInt16 attrCount=aToken->GetAttributeCount();
eHTMLTags theParent=mBodyContext->Last(); eHTMLTags theParent=mBodyContext->Last();
@ -763,7 +763,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
PRBool theTagWasHandled=PR_FALSE; PRBool theTagWasHandled=PR_FALSE;
switch(theChildTag) { switch(theChildTag) {
case eHTMLTag_html: case eHTMLTag_html:
if(!HasOpenContainer(theChildTag)) { if(!HasOpenContainer(theChildTag)) {
mSink->OpenHTML(*theNode); mSink->OpenHTML(*theNode);

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

@ -22,7 +22,7 @@
*/ */
/** /**
* MODULE NOTES: * MODULE NOTES:
* @update gess 7/15/98 * @update gess 7/15/98
* *
* NavDTD is an implementation of the nsIDTD interface. * NavDTD is an implementation of the nsIDTD interface.

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

@ -701,17 +701,18 @@ public:
case eHTMLTag_tr: case eHTMLTag_tr:
case eHTMLTag_th: case eHTMLTag_th:
if(aContext->mTableStates && (!aContext->mTableStates->mHasTBody)) {
if(!aContext->HasOpenContainer(eHTMLTag_tbody)) {
nsCParserNode* theNode=new nsCParserNode(); nsCParserNode* theNode=new nsCParserNode();
CToken* theToken=new CStartToken(eHTMLTag_tbody); CToken* theToken=new CStartToken(eHTMLTag_tbody);
theNode->Init(theToken,0,0); //this will likely leak... theNode->Init(theToken,0,0); //this will likely leak...
result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink); result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink);
if(NS_SUCCEEDED(result)) { }
CElement *theElement=GetElement(eHTMLTag_tbody); if(NS_SUCCEEDED(result)) {
if(theElement) { CElement *theElement=GetElement(eHTMLTag_tbody);
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink); if(theElement) {
} result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
} }
} }