improvements to fix a table bug for cujo.

git-svn-id: svn://10.0.0.236/trunk@15890 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1998-12-06 20:29:29 +00:00
parent 5d7c8750fd
commit d48b237993
2 changed files with 4 additions and 2 deletions

View File

@@ -813,6 +813,7 @@ nsresult CNavDTD::HandleDefaultStartToken(CToken* aToken,eHTMLTags aChildTag,nsI
if(RequiresAutomaticClosure(theParentTag,aChildTag)){
result=CloseContainersTo(aChildTag,PR_TRUE);
theParentTag=mBodyContext->mElements.Last();
}
PRBool theCanContainResult=CanContain(theParentTag,aChildTag);
@@ -1811,7 +1812,7 @@ PRBool CNavDTD::CanContainIndirect(eHTMLTags aParent,eHTMLTags aChild) const {
* @return PR_TRUE if autoclosure should occur
*/
PRBool CNavDTD::RequiresAutomaticClosure(eHTMLTags aParentTag,eHTMLTags aChildTag) const {
static eHTMLTags gAutoCloseTags[]={eHTMLTag_li,eHTMLTag_td,eHTMLTag_tr,eHTMLTag_dt};
static eHTMLTags gAutoCloseTags[]={eHTMLTag_li,eHTMLTag_td,eHTMLTag_tr,eHTMLTag_dt,eHTMLTag_table};
PRBool result=PR_FALSE;
PRInt32 theParentIndex=kNotFound;

View File

@@ -813,6 +813,7 @@ nsresult CNavDTD::HandleDefaultStartToken(CToken* aToken,eHTMLTags aChildTag,nsI
if(RequiresAutomaticClosure(theParentTag,aChildTag)){
result=CloseContainersTo(aChildTag,PR_TRUE);
theParentTag=mBodyContext->mElements.Last();
}
PRBool theCanContainResult=CanContain(theParentTag,aChildTag);
@@ -1811,7 +1812,7 @@ PRBool CNavDTD::CanContainIndirect(eHTMLTags aParent,eHTMLTags aChild) const {
* @return PR_TRUE if autoclosure should occur
*/
PRBool CNavDTD::RequiresAutomaticClosure(eHTMLTags aParentTag,eHTMLTags aChildTag) const {
static eHTMLTags gAutoCloseTags[]={eHTMLTag_li,eHTMLTag_td,eHTMLTag_tr,eHTMLTag_dt};
static eHTMLTags gAutoCloseTags[]={eHTMLTag_li,eHTMLTag_td,eHTMLTag_tr,eHTMLTag_dt,eHTMLTag_table};
PRBool result=PR_FALSE;
PRInt32 theParentIndex=kNotFound;