Removed hack

git-svn-id: svn://10.0.0.236/trunk@696 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp
1998-04-27 15:39:58 +00:00
parent 5e9b1def1f
commit 90530086bd
11 changed files with 0 additions and 162 deletions

View File

@@ -223,58 +223,3 @@ NS_IMETHODIMP nsHTMLDocument::AggIHTMLDocument::GetImageMap(const nsString& aMap
nsIImageMap** aResult) {
return GET_OUTER()->GetImageMap(aMapName, aResult);
}
//----------------------------------------------------------------------
#ifdef NS_DEBUG
NS_LAYOUT void
NS_HackAppendContent(nsIDocument* aDoc)
{
((nsHTMLDocument*)aDoc)->HackAppendContent();
}
#include "nsIHTMLContent.h"
#include "nsIAtom.h"
static const char* kBigParagraph =
"This is some text. It will be word wrapped because our container will "
"word wrap us. It will also be baseline aligned because our container "
"will do that too. ";
#define NUM_BIG_TEXTS 114
nsresult nsHTMLDocument::HackAppendSimpleSpan(nsIContent* aContainer,
const char* aTag,
const char* aText)
{
nsIHTMLContent* span;
nsIHTMLContent* text;
nsIAtom* atom = NS_NewAtom(aTag);
nsresult rv = NS_NewHTMLContainer(&span, atom);
if (NS_OK == rv) {
nsAutoString tmp;
for (PRIntn i = 0; i < NUM_BIG_TEXTS; i++) {
tmp.Append(aText);
}
rv = NS_NewHTMLText(&text, tmp.GetUnicode(), tmp.Length());
if (NS_OK == rv) {
span->AppendChild(text);
NS_RELEASE(text);
}
aContainer->AppendChild(span);
NS_RELEASE(span);
}
NS_RELEASE(atom);
return rv;
}
void nsHTMLDocument::HackAppendContent()
{
nsIContent* body = mRootContent->ChildAt(0);
HackAppendSimpleSpan(body, "P", kBigParagraph);
NS_RELEASE(body);
}
#endif