Using CNavDTD::CanContain() in CanOmit().

Added a check for SCRIPT tag in CNavDTD::CanContain()
that would allow <SCRIPT> tag to be contained anywhere
in a document
This commit is contained in:
harishd%netscape.com 1999-05-18 01:26:21 +00:00
Родитель 09e42ed6e2
Коммит 8624d0a30a
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -1931,6 +1931,8 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
return PR_TRUE;
}//if
}//if
if(aChild == eHTMLTag_script)
return PR_TRUE;
return gHTMLElements[aParent].CanContain((eHTMLTags)aChild);
}
@ -2007,7 +2009,7 @@ PRBool CNavDTD::CanOmit(eHTMLTags aParent,eHTMLTags aChild) const {
}
//Now the obvious test: if the parent can contain the child, don't omit.
if((gHTMLElements[aParent].CanContain(aChild)) || (aChild==aParent)){
if(CanContain(aParent,aChild) || (aChild==aParent)){
return PR_FALSE;
}

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

@ -1931,6 +1931,8 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) const {
return PR_TRUE;
}//if
}//if
if(aChild == eHTMLTag_script)
return PR_TRUE;
return gHTMLElements[aParent].CanContain((eHTMLTags)aChild);
}
@ -2007,7 +2009,7 @@ PRBool CNavDTD::CanOmit(eHTMLTags aParent,eHTMLTags aChild) const {
}
//Now the obvious test: if the parent can contain the child, don't omit.
if((gHTMLElements[aParent].CanContain(aChild)) || (aChild==aParent)){
if(CanContain(aParent,aChild) || (aChild==aParent)){
return PR_FALSE;
}