Changing the way content elements store their name information, previously the elements generally stored a name atom and a namespace ID, now they store a pointer to a shared structure containing the name atom, the prefix atom and the namespace ID. This structure is shared between nodes with unique names (ie same name, prefix and ns ID) within a document. Documents now hold a hash table of the names in the document. The changes to mozilla/rdf are not reviewed but they are approved by waterson@netscape.com and the changes to mozilla/layout are reviewed by buster@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@69034 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -39,7 +39,7 @@ class nsHTMLTableColGroupElement : public nsIDOMHTMLTableColElement,
|
||||
public nsIHTMLContent
|
||||
{
|
||||
public:
|
||||
nsHTMLTableColGroupElement(nsIAtom* aTag);
|
||||
nsHTMLTableColGroupElement(nsINodeInfo *aNodeInfo);
|
||||
virtual ~nsHTMLTableColGroupElement();
|
||||
|
||||
// nsISupports
|
||||
@@ -82,13 +82,13 @@ protected:
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewHTMLTableColGroupElement(nsIHTMLContent** aInstancePtrResult, nsIAtom* aTag)
|
||||
NS_NewHTMLTableColGroupElement(nsIHTMLContent** aInstancePtrResult,
|
||||
nsINodeInfo *aNodeInfo)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");
|
||||
if (nsnull == aInstancePtrResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
nsIHTMLContent* it = new nsHTMLTableColGroupElement(aTag);
|
||||
NS_ENSURE_ARG_POINTER(aInstancePtrResult);
|
||||
NS_ENSURE_ARG_POINTER(aNodeInfo);
|
||||
|
||||
nsIHTMLContent* it = new nsHTMLTableColGroupElement(aNodeInfo);
|
||||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@@ -96,10 +96,10 @@ NS_NewHTMLTableColGroupElement(nsIHTMLContent** aInstancePtrResult, nsIAtom* aTa
|
||||
}
|
||||
|
||||
|
||||
nsHTMLTableColGroupElement::nsHTMLTableColGroupElement(nsIAtom* aTag)
|
||||
nsHTMLTableColGroupElement::nsHTMLTableColGroupElement(nsINodeInfo *aNodeInfo)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mInner.Init(this, aTag);
|
||||
mInner.Init(this, aNodeInfo);
|
||||
}
|
||||
|
||||
nsHTMLTableColGroupElement::~nsHTMLTableColGroupElement()
|
||||
@@ -127,7 +127,7 @@ nsHTMLTableColGroupElement::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
nsresult
|
||||
nsHTMLTableColGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
{
|
||||
nsHTMLTableColGroupElement* it = new nsHTMLTableColGroupElement(mInner.mTag);
|
||||
nsHTMLTableColGroupElement* it = new nsHTMLTableColGroupElement(mInner.mNodeInfo);
|
||||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user