Expose NS_QuoteForHTML; remove duplicate frame ctor method decls

This commit is contained in:
kipp%netscape.com 1998-09-06 00:19:14 +00:00
parent ecd28a1c73
commit 833260255c
2 changed files with 8 additions and 20 deletions

View File

@ -1574,8 +1574,8 @@ nsGenericHTMLElement::ToHTML(FILE* out) const
// XXX i18n: this is wrong (?) because we need to know the outgoing
// character set (I think)
static void
QuoteForHTML(const nsString& aValue, nsString& aResult)
void
NS_QuoteForHTML(const nsString& aValue, nsString& aResult)
{
aResult.Truncate();
const PRUnichar* cp = aValue.GetUnicode();
@ -1630,7 +1630,7 @@ nsGenericHTMLElement::ToHTMLString(nsString& aBuf) const
GetAttribute(name, value);
if (value.Length() > 0) {
aBuf.Append('=');
QuoteForHTML(value, quotedValue);
NS_QuoteForHTML(value, quotedValue);
aBuf.Append(quotedValue);
}
}
@ -1646,13 +1646,6 @@ nsGenericHTMLElement::ToHTMLString(nsString& aBuf) const
// XXX this is REALLY temporary code
extern nsresult NS_NewBRFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
extern nsresult NS_NewHRFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
extern nsresult NS_NewObjectFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
nsresult
nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
nsIFrame* aParentFrame,
@ -1690,6 +1683,7 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
else if (mTag == nsHTMLAtoms::wbr) {
rv = NS_NewWBRFrame(mContent, aParentFrame, frame);
}
if (NS_OK != rv) {
return rv;
}

View File

@ -1574,8 +1574,8 @@ nsGenericHTMLElement::ToHTML(FILE* out) const
// XXX i18n: this is wrong (?) because we need to know the outgoing
// character set (I think)
static void
QuoteForHTML(const nsString& aValue, nsString& aResult)
void
NS_QuoteForHTML(const nsString& aValue, nsString& aResult)
{
aResult.Truncate();
const PRUnichar* cp = aValue.GetUnicode();
@ -1630,7 +1630,7 @@ nsGenericHTMLElement::ToHTMLString(nsString& aBuf) const
GetAttribute(name, value);
if (value.Length() > 0) {
aBuf.Append('=');
QuoteForHTML(value, quotedValue);
NS_QuoteForHTML(value, quotedValue);
aBuf.Append(quotedValue);
}
}
@ -1646,13 +1646,6 @@ nsGenericHTMLElement::ToHTMLString(nsString& aBuf) const
// XXX this is REALLY temporary code
extern nsresult NS_NewBRFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
extern nsresult NS_NewHRFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
extern nsresult NS_NewObjectFrame(nsIContent* aContent, nsIFrame* aParentFrame,
nsIFrame*& aNewFrame);
nsresult
nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
nsIFrame* aParentFrame,
@ -1690,6 +1683,7 @@ nsGenericHTMLElement::CreateFrame(nsIPresContext* aPresContext,
else if (mTag == nsHTMLAtoms::wbr) {
rv = NS_NewWBRFrame(mContent, aParentFrame, frame);
}
if (NS_OK != rv) {
return rv;
}