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:
Родитель
09e42ed6e2
Коммит
8624d0a30a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче