fixed a tinderbox problem introduced in latest contentsinkstream

This commit is contained in:
rickg 1998-07-15 00:21:39 +00:00
parent 4220c344d9
commit d09bc7fbb3
8 changed files with 20 additions and 72 deletions

View File

@ -77,13 +77,12 @@ static char gHeadingTags[]={
0};
static char gStyleTags[]={
eHTMLTag_a, eHTMLTag_b, eHTMLTag_big,
eHTMLTag_blink, eHTMLTag_cite, eHTMLTag_em,
eHTMLTag_font, eHTMLTag_i, eHTMLTag_kbd,
eHTMLTag_s, eHTMLTag_small,
eHTMLTag_strike,
eHTMLTag_strong, eHTMLTag_sub, eHTMLTag_sup,
eHTMLTag_tt, eHTMLTag_u, eHTMLTag_var,
eHTMLTag_a, eHTMLTag_b, eHTMLTag_big,
eHTMLTag_blink, eHTMLTag_cite, eHTMLTag_em,
eHTMLTag_font, eHTMLTag_i, eHTMLTag_kbd,
eHTMLTag_s, eHTMLTag_small, eHTMLTag_strike,
eHTMLTag_strong, eHTMLTag_sub, eHTMLTag_sup,
eHTMLTag_tt, eHTMLTag_u, eHTMLTag_var,
0};
static char gWhitespaceTags[]={
@ -1042,7 +1041,7 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) {
eHTMLTag_label, eHTMLTag_map, eHTMLTag_newline, eHTMLTag_nobr,
eHTMLTag_object, eHTMLTag_p,
eHTMLTag_q, eHTMLTag_s, eHTMLTag_strike,
eHTMLTag_q, eHTMLTag_s, eHTMLTag_strike,
eHTMLTag_samp, eHTMLTag_script,
eHTMLTag_select, eHTMLTag_small, eHTMLTag_span, eHTMLTag_strong,
eHTMLTag_sub, eHTMLTag_sup, eHTMLTag_text, eHTMLTag_textarea,
@ -1128,6 +1127,7 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) {
case eHTMLTag_small:
case eHTMLTag_span:
case eHTMLTag_strike:
case eHTMLTag_s:
case eHTMLTag_sub:
case eHTMLTag_sup:
case eHTMLTag_tt:

View File

@ -249,26 +249,6 @@ void WritePair(eHTMLTags aTag,const nsString& theContent,int tab,ostream& aStrea
}
/**
*
* @update gess7/5/98
* @param
* @return
*/
void WriteSingleton(eHTMLTags aTag,const nsString& theContent,int tab,ostream& aStream) {
const char* titleStr = GetTagName(aTag);
OpenTag(titleStr,tab,aStream,PR_TRUE);
if(theContent.Length()) {
theContent.ToCString(gBuffer,sizeof(gBuffer)-1);
aStream << gBuffer;
}
aStream << endl;
}
/**
* This method gets called by the parser when it encounters
* a title tag and wants to set the document title in the sink.

View File

@ -298,7 +298,7 @@ protected:
/**
* Indent/outdent when the open/close tags are encountered.
* This implies that breakAfterOpen() and breakBeforeClose()
* are true no matter what those methods return.
* are PR_TRUE no matter what those methods return.
*/
PRBool IndentChildren(eHTMLTags aTag) const;
@ -321,7 +321,7 @@ protected:
/**
* Are we allowed to insert new white space before the open tag.
*
* Returning false does not prevent inserting WS
* Returning PR_FALSE does not prevent inserting WS
* before the tag if WS insertion is allowed for another reason,
* e.g. there is already WS there or we are after a tag that
* has PermitWSAfter*().

View File

@ -159,9 +159,6 @@ PRInt32 CStartToken::GetTypeID(){
case eHTMLTag_menu:
mTypeID=eHTMLTag_ul;
break;
case eHTMLTag_s:
mTypeID=eHTMLTag_strike;
break;
default:
break;
}
@ -345,9 +342,6 @@ PRInt32 CEndToken::GetTypeID(){
case eHTMLTag_menu:
mTypeID=eHTMLTag_ul;
break;
case eHTMLTag_s:
mTypeID=eHTMLTag_strike;
break;
default:
break;
}

View File

@ -77,13 +77,12 @@ static char gHeadingTags[]={
0};
static char gStyleTags[]={
eHTMLTag_a, eHTMLTag_b, eHTMLTag_big,
eHTMLTag_blink, eHTMLTag_cite, eHTMLTag_em,
eHTMLTag_font, eHTMLTag_i, eHTMLTag_kbd,
eHTMLTag_s, eHTMLTag_small,
eHTMLTag_strike,
eHTMLTag_strong, eHTMLTag_sub, eHTMLTag_sup,
eHTMLTag_tt, eHTMLTag_u, eHTMLTag_var,
eHTMLTag_a, eHTMLTag_b, eHTMLTag_big,
eHTMLTag_blink, eHTMLTag_cite, eHTMLTag_em,
eHTMLTag_font, eHTMLTag_i, eHTMLTag_kbd,
eHTMLTag_s, eHTMLTag_small, eHTMLTag_strike,
eHTMLTag_strong, eHTMLTag_sub, eHTMLTag_sup,
eHTMLTag_tt, eHTMLTag_u, eHTMLTag_var,
0};
static char gWhitespaceTags[]={
@ -1042,7 +1041,7 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) {
eHTMLTag_label, eHTMLTag_map, eHTMLTag_newline, eHTMLTag_nobr,
eHTMLTag_object, eHTMLTag_p,
eHTMLTag_q, eHTMLTag_s, eHTMLTag_strike,
eHTMLTag_q, eHTMLTag_s, eHTMLTag_strike,
eHTMLTag_samp, eHTMLTag_script,
eHTMLTag_select, eHTMLTag_small, eHTMLTag_span, eHTMLTag_strong,
eHTMLTag_sub, eHTMLTag_sup, eHTMLTag_text, eHTMLTag_textarea,
@ -1128,6 +1127,7 @@ PRBool CNavDTD::CanContain(PRInt32 aParent,PRInt32 aChild) {
case eHTMLTag_small:
case eHTMLTag_span:
case eHTMLTag_strike:
case eHTMLTag_s:
case eHTMLTag_sub:
case eHTMLTag_sup:
case eHTMLTag_tt:

View File

@ -249,26 +249,6 @@ void WritePair(eHTMLTags aTag,const nsString& theContent,int tab,ostream& aStrea
}
/**
*
* @update gess7/5/98
* @param
* @return
*/
void WriteSingleton(eHTMLTags aTag,const nsString& theContent,int tab,ostream& aStream) {
const char* titleStr = GetTagName(aTag);
OpenTag(titleStr,tab,aStream,PR_TRUE);
if(theContent.Length()) {
theContent.ToCString(gBuffer,sizeof(gBuffer)-1);
aStream << gBuffer;
}
aStream << endl;
}
/**
* This method gets called by the parser when it encounters
* a title tag and wants to set the document title in the sink.

View File

@ -298,7 +298,7 @@ protected:
/**
* Indent/outdent when the open/close tags are encountered.
* This implies that breakAfterOpen() and breakBeforeClose()
* are true no matter what those methods return.
* are PR_TRUE no matter what those methods return.
*/
PRBool IndentChildren(eHTMLTags aTag) const;
@ -321,7 +321,7 @@ protected:
/**
* Are we allowed to insert new white space before the open tag.
*
* Returning false does not prevent inserting WS
* Returning PR_FALSE does not prevent inserting WS
* before the tag if WS insertion is allowed for another reason,
* e.g. there is already WS there or we are after a tag that
* has PermitWSAfter*().

View File

@ -159,9 +159,6 @@ PRInt32 CStartToken::GetTypeID(){
case eHTMLTag_menu:
mTypeID=eHTMLTag_ul;
break;
case eHTMLTag_s:
mTypeID=eHTMLTag_strike;
break;
default:
break;
}
@ -345,9 +342,6 @@ PRInt32 CEndToken::GetTypeID(){
case eHTMLTag_menu:
mTypeID=eHTMLTag_ul;
break;
case eHTMLTag_s:
mTypeID=eHTMLTag_strike;
break;
default:
break;
}