зеркало из https://github.com/mozilla/pjs.git
more fun with the Strict DTD
This commit is contained in:
Родитель
6750e537b7
Коммит
30c4d5f49b
|
@ -748,7 +748,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
|
|||
|
||||
nsCParserNode* theNode=CreateNode();
|
||||
theNode->Init(aToken,mLineNumber,mTokenRecycler);
|
||||
|
||||
|
||||
eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID();
|
||||
PRInt16 attrCount=aToken->GetAttributeCount();
|
||||
eHTMLTags theParent=mBodyContext->Last();
|
||||
|
@ -763,7 +763,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
|
|||
PRBool theTagWasHandled=PR_FALSE;
|
||||
|
||||
switch(theChildTag) {
|
||||
|
||||
|
||||
case eHTMLTag_html:
|
||||
if(!HasOpenContainer(theChildTag)) {
|
||||
mSink->OpenHTML(*theNode);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* MODULE NOTES:
|
||||
* MODULE NOTES:
|
||||
* @update gess 7/15/98
|
||||
*
|
||||
* NavDTD is an implementation of the nsIDTD interface.
|
||||
|
|
|
@ -701,17 +701,18 @@ public:
|
|||
|
||||
case eHTMLTag_tr:
|
||||
case eHTMLTag_th:
|
||||
if(aContext->mTableStates && (!aContext->mTableStates->mHasTBody)) {
|
||||
|
||||
if(!aContext->HasOpenContainer(eHTMLTag_tbody)) {
|
||||
nsCParserNode* theNode=new nsCParserNode();
|
||||
CToken* theToken=new CStartToken(eHTMLTag_tbody);
|
||||
theNode->Init(theToken,0,0); //this will likely leak...
|
||||
|
||||
result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink);
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
CElement *theElement=GetElement(eHTMLTag_tbody);
|
||||
if(theElement) {
|
||||
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
CElement *theElement=GetElement(eHTMLTag_tbody);
|
||||
if(theElement) {
|
||||
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -748,7 +748,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
|
|||
|
||||
nsCParserNode* theNode=CreateNode();
|
||||
theNode->Init(aToken,mLineNumber,mTokenRecycler);
|
||||
|
||||
|
||||
eHTMLTags theChildTag=(eHTMLTags)aToken->GetTypeID();
|
||||
PRInt16 attrCount=aToken->GetAttributeCount();
|
||||
eHTMLTags theParent=mBodyContext->Last();
|
||||
|
@ -763,7 +763,7 @@ nsresult COtherDTD::HandleStartToken(CToken* aToken) {
|
|||
PRBool theTagWasHandled=PR_FALSE;
|
||||
|
||||
switch(theChildTag) {
|
||||
|
||||
|
||||
case eHTMLTag_html:
|
||||
if(!HasOpenContainer(theChildTag)) {
|
||||
mSink->OpenHTML(*theNode);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* MODULE NOTES:
|
||||
* MODULE NOTES:
|
||||
* @update gess 7/15/98
|
||||
*
|
||||
* NavDTD is an implementation of the nsIDTD interface.
|
||||
|
|
|
@ -701,17 +701,18 @@ public:
|
|||
|
||||
case eHTMLTag_tr:
|
||||
case eHTMLTag_th:
|
||||
if(aContext->mTableStates && (!aContext->mTableStates->mHasTBody)) {
|
||||
|
||||
if(!aContext->HasOpenContainer(eHTMLTag_tbody)) {
|
||||
nsCParserNode* theNode=new nsCParserNode();
|
||||
CToken* theToken=new CStartToken(eHTMLTag_tbody);
|
||||
theNode->Init(theToken,0,0); //this will likely leak...
|
||||
|
||||
result=HandleStartToken(theNode,eHTMLTag_tbody,aContext,aSink);
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
CElement *theElement=GetElement(eHTMLTag_tbody);
|
||||
if(theElement) {
|
||||
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
CElement *theElement=GetElement(eHTMLTag_tbody);
|
||||
if(theElement) {
|
||||
result=theElement->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче