зеркало из https://github.com/mozilla/gecko-dev.git
Moved kLegalOpen from BODY to SCRIPT.
CanContain() now checks for kLegalOpen.
This commit is contained in:
Родитель
904dc09dc9
Коммит
ae9d16c074
|
@ -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...
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче