fixed RTM++ compatibility bugs: 53011, 54117, 54651, 54834, 54840, 55095. sr=buster, r=buster, attinasi, harish, sfraser for various portions.
git-svn-id: svn://10.0.0.236/trunk@80977 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1163,7 +1163,7 @@ void InitializeElementTable(void) {
|
||||
|
||||
Initialize(
|
||||
/*tag*/ eHTMLTag_thead,
|
||||
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
|
||||
/*req-parent excl-parent*/ eHTMLTag_table,eHTMLTag_unknown, //fix bug 54840...
|
||||
/*rootnodes,endrootnodes*/ &gInTable,&gInTable,
|
||||
/*autoclose starttags and endtags*/ &gTBodyAutoClose,0,0,0,
|
||||
/*parent,incl,exclgroups*/ kNone, kNone, kSelf,
|
||||
@@ -1379,8 +1379,20 @@ PRBool nsHTMLElement::IsContainer(eHTMLTags aChild) {
|
||||
* @return
|
||||
*/
|
||||
PRBool nsHTMLElement::IsMemberOf(PRInt32 aSet) const{
|
||||
PRBool result=TestBits(aSet,mParentBits);
|
||||
return result;
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1906,7 +1918,7 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
|
||||
}
|
||||
|
||||
//phrasal elements can close other phrasals, along with fontstyle and special tags...
|
||||
if(!gHTMLElements[theTag].IsMemberOf(kSpecial|kFontStyle|kPhrase)) {
|
||||
if(!gHTMLElements[theTag].ContainsSet(kSpecial|kFontStyle|kPhrase)) {
|
||||
break; //it's not something I can close
|
||||
}
|
||||
}
|
||||
@@ -1949,7 +1961,7 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
|
||||
}
|
||||
}
|
||||
|
||||
else if(IsMemberOf(kFormControl|kExtensions|kPreformatted)){
|
||||
else if(ContainsSet(kFormControl|kExtensions|kPreformatted)){ //bug54834...
|
||||
|
||||
while((--theIndex>=anIndex) && (eHTMLTag_unknown==result)){
|
||||
eHTMLTags theTag=aContext.TagAt(theIndex);
|
||||
|
||||
Reference in New Issue
Block a user