backing out rickg's htmlparser changes (backing out fixes 56265 for two

independent developers).


git-svn-id: svn://10.0.0.236/trunk@81034 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
leaf%mozilla.org
2000-10-12 18:22:15 +00:00
parent db86f25730
commit 2f29f2439c
12 changed files with 142 additions and 238 deletions

View File

@@ -1163,7 +1163,7 @@ void InitializeElementTable(void) {
Initialize(
/*tag*/ eHTMLTag_thead,
/*req-parent excl-parent*/ eHTMLTag_table,eHTMLTag_unknown, //fix bug 54840...
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
/*rootnodes,endrootnodes*/ &gInTable,&gInTable,
/*autoclose starttags and endtags*/ &gTBodyAutoClose,0,0,0,
/*parent,incl,exclgroups*/ kNone, kNone, kSelf,
@@ -1379,20 +1379,8 @@ PRBool nsHTMLElement::IsContainer(eHTMLTags aChild) {
* @return
*/
PRBool nsHTMLElement::IsMemberOf(PRInt32 aSet) const{
return TestBits(aSet,mParentBits);
}
/**
* This tests whether all the bits in the parentbits
* are included in the given set. It may be too
* broad a question for most cases.
*
* @update gess12/13/98
* @param
* @return
*/
PRBool nsHTMLElement::ContainsSet(PRInt32 aSet) const{
return TestBits(mParentBits,aSet);
PRBool result=TestBits(aSet,mParentBits);
return result;
}
/**
@@ -1918,7 +1906,7 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
}
//phrasal elements can close other phrasals, along with fontstyle and special tags...
if(!gHTMLElements[theTag].ContainsSet(kSpecial|kFontStyle|kPhrase)) {
if(!gHTMLElements[theTag].IsMemberOf(kSpecial|kFontStyle|kPhrase)) {
break; //it's not something I can close
}
}
@@ -1961,7 +1949,7 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
}
}
else if(ContainsSet(kFormControl|kExtensions|kPreformatted)){ //bug54834...
else if(IsMemberOf(kFormControl|kExtensions|kPreformatted)){
while((--theIndex>=anIndex) && (eHTMLTag_unknown==result)){
eHTMLTags theTag=aContext.TagAt(theIndex);