Work in progress for incremental reflow (insert)

This commit is contained in:
troy
1998-05-04 17:54:45 +00:00
parent 7cd356da7d
commit a2099732fa
16 changed files with 210 additions and 28 deletions
@@ -26,8 +26,11 @@
#include "nsIPresShell.h"
#include "nsIPresContext.h"
#include "nsIImageMap.h"
#include "nsIHTMLContent.h"
#include "nsIDOMElement.h"
static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID);
static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID);
static NS_DEFINE_IID(kIHTMLDocumentIID, NS_IHTMLDOCUMENT_IID);
NS_LAYOUT nsresult
@@ -184,6 +187,27 @@ void nsHTMLDocument::AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet
}
}
nsresult nsHTMLDocument::CreateElement(nsString &aTagName,
nsIDOMAttributeList *aAttributes,
nsIDOMElement **aElement)
{
nsIHTMLContent* container = nsnull;
nsAutoString tmp(aTagName);
nsIAtom* atom;
nsresult rv;
tmp.ToUpperCase();
atom = NS_NewAtom(tmp);
rv = NS_NewHTMLContainer(&container, atom);
if (NS_OK == rv) {
rv = container->QueryInterface(kIDOMElementIID, (void**)aElement);
}
NS_RELEASE(atom);
return rv;
}
//----------------------------------------------------------------------
// Aggregation class to give nsHTMLDocument the nsIHTMLDocument interface