Work in progress for incremental reflow (insert)

git-svn-id: svn://10.0.0.236/trunk@1097 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy
1998-05-04 17:54:45 +00:00
parent 88dd3c090e
commit 087c280a87
16 changed files with 210 additions and 28 deletions

View File

@@ -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