mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 18:24:02 +00:00
allow <body> tags to be optional in strictDTD; not part of main build
This commit is contained in:
parent
2c2844d070
commit
396e31a440
@ -1705,7 +1705,31 @@ public:
|
||||
result=OpenContext(aNode,aTag,aContext,aSink);
|
||||
break;
|
||||
|
||||
case eHTMLTag_newline:
|
||||
case eHTMLTag_whitespace:
|
||||
case eHTMLTag_comment:
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
CElement* theBody=GetElement(eHTMLTag_body);
|
||||
if(theBody) {
|
||||
CElement *theChildElement=GetElement(aTag);
|
||||
if(theBody->CanContain(theChildElement,aContext)) {
|
||||
//let's auto open the body
|
||||
|
||||
CToken* theToken=new CStartToken(eHTMLTag_body);
|
||||
nsCParserNode* theNode=new nsCParserNode(theToken,0,0);
|
||||
|
||||
result=HandleStartToken(theNode,eHTMLTag_body,aContext,aSink);
|
||||
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
if(eHTMLTag_body==aContext->Last()) {
|
||||
result=theBody->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//for now, let's drop other elements onto the floor.
|
||||
break;
|
||||
}//switch
|
||||
|
@ -1705,7 +1705,31 @@ public:
|
||||
result=OpenContext(aNode,aTag,aContext,aSink);
|
||||
break;
|
||||
|
||||
case eHTMLTag_newline:
|
||||
case eHTMLTag_whitespace:
|
||||
case eHTMLTag_comment:
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
CElement* theBody=GetElement(eHTMLTag_body);
|
||||
if(theBody) {
|
||||
CElement *theChildElement=GetElement(aTag);
|
||||
if(theBody->CanContain(theChildElement,aContext)) {
|
||||
//let's auto open the body
|
||||
|
||||
CToken* theToken=new CStartToken(eHTMLTag_body);
|
||||
nsCParserNode* theNode=new nsCParserNode(theToken,0,0);
|
||||
|
||||
result=HandleStartToken(theNode,eHTMLTag_body,aContext,aSink);
|
||||
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
if(eHTMLTag_body==aContext->Last()) {
|
||||
result=theBody->HandleStartToken(aNode,aTag,aContext,aSink);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//for now, let's drop other elements onto the floor.
|
||||
break;
|
||||
}//switch
|
||||
|
Loading…
x
Reference in New Issue
Block a user