bug 117738: <dl> within <font> nested in <table> is ignored. r=rbs sr=jst

git-svn-id: svn://10.0.0.236/trunk@167654 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-01-13 03:34:18 +00:00
parent 2040b1004d
commit 0bdf148e90
3 changed files with 18 additions and 26 deletions

View File

@@ -2022,35 +2022,26 @@ PRBool nsHTMLElement::CanContainSelf(void) const {
*
* @update gess 12/20/99
* @param aContext is the tag stack we're testing against
* @param aIndex is the index of the tag we want to close
* @param aChildTag is the child we're trying to close
* @param aCount is the number tags we should test
* @return TRUE if we can autoclose the start tag; FALSE otherwise
*/
PRBool nsHTMLElement::CanAutoCloseTag(nsDTDContext& aContext,eHTMLTags aChildTag) const{
PRBool nsHTMLElement::CanAutoCloseTag(nsDTDContext& aContext,PRInt32 aIndex,
eHTMLTags aChildTag) const{
PRInt32 thePos=aContext.GetCount();
PRBool result=PR_FALSE;
eHTMLTags thePrevTag=eHTMLTag_unknown;
PRInt32 thePos;
PRBool result = PR_TRUE;
eHTMLTags thePrevTag;
for(thePos=aContext.GetCount()-1;thePos>0;thePos--) {
thePrevTag=aContext.TagAt(thePos);
switch(thePrevTag) {
case eHTMLTag_applet:
case eHTMLTag_td:
thePos=0;
result=PR_FALSE;
break;
case eHTMLTag_body:
result=aChildTag!=thePrevTag;
thePos=0;
default:
if(aChildTag==thePrevTag) {
result=PR_TRUE;
thePos=0;
}
break;
} //switch
} //for
for(thePos = aContext.GetCount() - 1; thePos >= aIndex; thePos--) {
thePrevTag = aContext.TagAt(thePos);
if (thePrevTag == eHTMLTag_applet ||
thePrevTag == eHTMLTag_td) {
result = PR_FALSE;
break;
}
}
return result;
}