Moved kLegalOpen from BODY to SCRIPT.
CanContain() now checks for kLegalOpen. git-svn-id: svn://10.0.0.236/trunk@42811 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
afe45386a9
commit
0ed2af9017
@ -366,7 +366,7 @@ nsHTMLElement gHTMLElements[] = {
|
||||
/*rootnodes,endrootnodes*/ &gInHTML, &gInHTML,
|
||||
/*autoclose starttags and endtags*/ &gBodyAutoClose,0,0,
|
||||
/*parent,incl,exclgroups*/ kHTMLContent,(kFlowEntity|kSelf), kNone,
|
||||
/*special props, prop-range*/ kOmitEndTag|kLegalOpen, kBodyPropRange,
|
||||
/*special props, prop-range*/ kOmitEndTag, kBodyPropRange,
|
||||
/*special parents,kids,skip*/ &gInNoframes,&gBodyKids,eHTMLTag_unknown},
|
||||
|
||||
{ /*tag*/ eHTMLTag_br,
|
||||
@ -927,7 +927,7 @@ nsHTMLElement gHTMLElements[] = {
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,
|
||||
/*parent,incl,exclgroups*/ (kSpecial|kHeadMisc), kPCDATA, kNone,
|
||||
/*special props, prop-range*/ kNoStyleLeaksIn, kNoPropRange,
|
||||
/*special props, prop-range*/ kNoStyleLeaksIn|kLegalOpen, kNoPropRange,
|
||||
/*special parents,kids,skip*/ 0,&gContainsText,eHTMLTag_script},
|
||||
|
||||
{ /*tag*/ eHTMLTag_select,
|
||||
@ -1681,6 +1681,11 @@ PRBool nsHTMLElement::CanContain(eHTMLTags aChild) const{
|
||||
|
||||
if(IsContainer(mTagID)){
|
||||
|
||||
if(gHTMLElements[aChild].HasSpecialProperty(kLegalOpen)) {
|
||||
// Some tags could be opened anywhere, in the document, as they please.
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
if(mTagID==aChild) {
|
||||
return CanContainSelf(); //not many tags can contain themselves...
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ nsHTMLElement gHTMLElements[] = {
|
||||
/*rootnodes,endrootnodes*/ &gInHTML, &gInHTML,
|
||||
/*autoclose starttags and endtags*/ &gBodyAutoClose,0,0,
|
||||
/*parent,incl,exclgroups*/ kHTMLContent,(kFlowEntity|kSelf), kNone,
|
||||
/*special props, prop-range*/ kOmitEndTag|kLegalOpen, kBodyPropRange,
|
||||
/*special props, prop-range*/ kOmitEndTag, kBodyPropRange,
|
||||
/*special parents,kids,skip*/ &gInNoframes,&gBodyKids,eHTMLTag_unknown},
|
||||
|
||||
{ /*tag*/ eHTMLTag_br,
|
||||
@ -927,7 +927,7 @@ nsHTMLElement gHTMLElements[] = {
|
||||
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
|
||||
/*autoclose starttags and endtags*/ 0,0,0,
|
||||
/*parent,incl,exclgroups*/ (kSpecial|kHeadMisc), kPCDATA, kNone,
|
||||
/*special props, prop-range*/ kNoStyleLeaksIn, kNoPropRange,
|
||||
/*special props, prop-range*/ kNoStyleLeaksIn|kLegalOpen, kNoPropRange,
|
||||
/*special parents,kids,skip*/ 0,&gContainsText,eHTMLTag_script},
|
||||
|
||||
{ /*tag*/ eHTMLTag_select,
|
||||
@ -1681,6 +1681,11 @@ PRBool nsHTMLElement::CanContain(eHTMLTags aChild) const{
|
||||
|
||||
if(IsContainer(mTagID)){
|
||||
|
||||
if(gHTMLElements[aChild].HasSpecialProperty(kLegalOpen)) {
|
||||
// Some tags could be opened anywhere, in the document, as they please.
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
if(mTagID==aChild) {
|
||||
return CanContainSelf(); //not many tags can contain themselves...
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user