Support SizeOf methods

git-svn-id: svn://10.0.0.236/trunk@49891 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-10-05 23:47:46 +00:00
parent efca1f8c77
commit 53b538cfc8
31 changed files with 535 additions and 48 deletions

View File

@@ -573,18 +573,6 @@ nsGenericHTMLElement::GetNameSpaceID(PRInt32& aID) const
return NS_OK;
}
//void
//nsHTMLTagContent::SizeOfWithoutThis(nsISizeOfHandler* aHandler) const
//{
// if (!aHandler->HaveSeen(mTag)) {
// mTag->SizeOf(aHandler);
// }
// if (!aHandler->HaveSeen(mAttributes)) {
// mAttributes->SizeOf(aHandler);
// }
//}
nsresult
nsGenericHTMLElement::ParseAttributeString(const nsString& aStr,
nsIAtom*& aName,
@@ -1233,6 +1221,26 @@ nsGenericHTMLElement::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
nsresult
nsGenericHTMLElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult,
size_t aInstanceSize) const
{
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
PRUint32 sum = 0;
#ifdef DEBUG
sum += (PRUint32) aInstanceSize;
if (mAttributes) {
PRUint32 attrs = 0;
mAttributes->SizeOf(aSizer, &attrs);
sum += attrs;
}
#endif
*aResult = sum;
return NS_OK;
}
nsresult
nsGenericHTMLElement::ToHTML(FILE* out) const
{