зеркало из https://github.com/mozilla/pjs.git
fixed rtm++ bugs: 56665, 57173. r=attinasi, harishd; sr=buster.
This commit is contained in:
Родитель
e4989c9270
Коммит
2deb0e499f
|
@ -1027,6 +1027,8 @@ PRBool CanBeContained(eHTMLTags aChildTag,nsDTDContext& aContext) {
|
|||
|
||||
result=PR_FALSE;
|
||||
|
||||
static eHTMLTags gTableElements[]={eHTMLTag_td,eHTMLTag_th};
|
||||
|
||||
PRInt32 theIndex=theCount-1;
|
||||
while(theChildIndex<theIndex) {
|
||||
eHTMLTags theParentTag=aContext.TagAt(theIndex--);
|
||||
|
@ -1039,6 +1041,10 @@ PRBool CanBeContained(eHTMLTags aChildTag,nsDTDContext& aContext) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if(FindTagInSet(theParentTag,gTableElements,sizeof(gTableElements)/sizeof(eHTMLTag_unknown))){
|
||||
result=PR_TRUE; //added this to catch a case we missed; bug 57173.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1892,7 +1892,7 @@ PRBool nsHTMLElement::CanAutoCloseTag(nsDTDContext& aContext,eHTMLTags aChildTag
|
|||
|
||||
/**
|
||||
*
|
||||
* @update gess12/13/98
|
||||
* @update gess 10.17.2000
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
@ -1918,7 +1918,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)) { //fix bug 56665
|
||||
break; //it's not something I can close
|
||||
}
|
||||
}
|
||||
|
@ -1961,7 +1961,8 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
|
|||
}
|
||||
}
|
||||
|
||||
else if(IsMemberOf(kFormControl|kExtensions|kPreformatted)){ //bug54834...
|
||||
else if( //ContainsSet(kPreformatted) ||
|
||||
IsMemberOf(kFormControl|kExtensions|kPreformatted)){ //bug54834...
|
||||
|
||||
while((--theIndex>=anIndex) && (eHTMLTag_unknown==result)){
|
||||
eHTMLTags theTag=aContext.TagAt(theIndex);
|
||||
|
|
|
@ -1027,6 +1027,8 @@ PRBool CanBeContained(eHTMLTags aChildTag,nsDTDContext& aContext) {
|
|||
|
||||
result=PR_FALSE;
|
||||
|
||||
static eHTMLTags gTableElements[]={eHTMLTag_td,eHTMLTag_th};
|
||||
|
||||
PRInt32 theIndex=theCount-1;
|
||||
while(theChildIndex<theIndex) {
|
||||
eHTMLTags theParentTag=aContext.TagAt(theIndex--);
|
||||
|
@ -1039,6 +1041,10 @@ PRBool CanBeContained(eHTMLTags aChildTag,nsDTDContext& aContext) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if(FindTagInSet(theParentTag,gTableElements,sizeof(gTableElements)/sizeof(eHTMLTag_unknown))){
|
||||
result=PR_TRUE; //added this to catch a case we missed; bug 57173.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1892,7 +1892,7 @@ PRBool nsHTMLElement::CanAutoCloseTag(nsDTDContext& aContext,eHTMLTags aChildTag
|
|||
|
||||
/**
|
||||
*
|
||||
* @update gess12/13/98
|
||||
* @update gess 10.17.2000
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
@ -1918,7 +1918,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)) { //fix bug 56665
|
||||
break; //it's not something I can close
|
||||
}
|
||||
}
|
||||
|
@ -1961,7 +1961,8 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
|
|||
}
|
||||
}
|
||||
|
||||
else if(IsMemberOf(kFormControl|kExtensions|kPreformatted)){ //bug54834...
|
||||
else if( //ContainsSet(kPreformatted) ||
|
||||
IsMemberOf(kFormControl|kExtensions|kPreformatted)){ //bug54834...
|
||||
|
||||
while((--theIndex>=anIndex) && (eHTMLTag_unknown==result)){
|
||||
eHTMLTags theTag=aContext.TagAt(theIndex);
|
||||
|
|
Загрузка…
Ссылка в новой задаче