Remove nsISizeOfHandler and associated SizeOf methods. b=106792 r=bzbarsky sr=jst

This commit is contained in:
dbaron%dbaron.org 2003-02-22 15:34:38 +00:00
parent 1a37dccfa6
commit 6dd68f3c64
250 changed files with 0 additions and 6676 deletions

View File

@ -53,7 +53,6 @@ class nsIDOMEvent;
class nsIContent;
class nsISupportsArray;
class nsIDOMRange;
class nsISizeOfHandler;
class nsINodeInfo;
class nsIEventListenerManager;
@ -514,23 +513,6 @@ public:
NS_IMETHOD DoneCreatingElement() = 0;
#ifdef DEBUG
/**
* Get the size of the content object. The size value should include
* all subordinate data referenced by the content that is not
* accounted for by child content. However, this value should not
* include the frame objects, style contexts, views or other data
* that lies logically outside the content model.
*
* If the implementation so chooses, instead of returning the total
* subordinate data it may instead use the sizeof handler to store
* away subordinate data under its own key so that the subordinate
* data may be tabulated independently of the frame itself.
*
* The caller is responsible for recursing over all children that
* the content contains.
*/
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const = 0;
/**
* List the content (and anything it contains) out to the given
* file stream. Use aIndent as the base indent during formatting.

View File

@ -42,8 +42,6 @@
#include "nsISupports.h"
class nsISizeOfHandler;
class nsIStyleSheet;
class nsIPresContext;
class nsIContent;
@ -64,8 +62,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize) = 0;
#endif
};

View File

@ -45,8 +45,6 @@
#include "nsILinkHandler.h"
#include "nsString.h"
class nsISizeOfHandler;
class nsIStyleSheet;
class nsIPresContext;
class nsIContent;
@ -174,10 +172,6 @@ public:
NS_IMETHOD HasStateDependentStyle(StateRuleProcessorData* aData,
nsIAtom* aMedium,
PRBool* aResult) = 0;
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize) = 0;
#endif
};
#endif /* nsIStyleRuleProcessor_h___ */

View File

@ -41,8 +41,6 @@
#include <stdio.h>
#include "nsISupports.h"
class nsISizeOfHandler;
class nsIAtom;
class nsString;
class nsIURI;
@ -108,8 +106,6 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize) = 0;
#endif
};

View File

@ -439,16 +439,3 @@ nsDOMAttributeMap::RemoveNamedItemNS(const nsAString& aNamespaceURI,
return rv;
}
#ifdef DEBUG
nsresult
nsDOMAttributeMap::SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap,
nsISizeOfHandler* aSizer,
PRUint32* aResult)
{
if (!aResult) return NS_ERROR_NULL_POINTER;
*aResult = sizeof(nsDOMAttributeMap);
return NS_OK;
}
#endif

View File

@ -59,12 +59,6 @@ public:
void DropReference();
#ifdef DEBUG
static nsresult SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap,
nsISizeOfHandler* aSizer,
PRUint32* aResult);
#endif
private:
nsIContent* mContent; // Weak reference
};

View File

@ -203,37 +203,3 @@ nsDOMDocumentType::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return CallQueryInterface(it, aReturn);
}
#ifdef DEBUG
NS_IMETHODIMP
nsDOMDocumentType::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
NS_ENSURE_ARG_POINTER(aResult);
PRUint32 sum;
nsGenericDOMDataNode::SizeOf(aSizer, &sum);
PRUint32 ssize;
mName.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mName) + ssize;
if (mEntities) {
PRBool recorded;
aSizer->RecordObject((void*) mEntities, &recorded);
if (!recorded) {
PRUint32 size;
nsDOMAttributeMap::SizeOfNamedNodeMap(mEntities, aSizer, &size);
aSizer->AddSize(nsLayoutAtoms::xml_document_entities, size);
}
}
if (mNotations) {
PRBool recorded;
aSizer->RecordObject((void*) mNotations, &recorded);
if (!recorded) {
PRUint32 size;
nsDOMAttributeMap::SizeOfNamedNodeMap(mNotations, aSizer, &size);
aSizer->AddSize(nsLayoutAtoms::xml_document_notations, size);
}
}
return NS_OK;
}
#endif

View File

@ -43,7 +43,6 @@
#include "nsIContent.h"
#include "nsGenericDOMDataNode.h"
#include "nsString.h"
#include "nsISizeOfHandler.h"
// XXX DocumentType is currently implemented by inheriting the generic
// CharacterData object, even though DocumentType is not character
@ -75,10 +74,6 @@ public:
// nsIContent
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsString mName;
nsIDOMNamedNodeMap* mEntities;

View File

@ -177,16 +177,6 @@ public:
return NS_OK;
}
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = sizeof(*this);
return NS_OK;
}
#endif
protected:
nsCOMPtr<nsIDocument> mOwnerDocument;
};

View File

@ -1067,18 +1067,6 @@ nsGenericDOMDataNode::DumpContent(FILE* out, PRInt32 aIndent,
{
return NS_OK;
}
NS_IMETHODIMP
nsGenericDOMDataNode::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
PRUint32 sum = sizeof(*this);
sum += mText.GetLength() * (mText.Is2b() ? sizeof(PRUnichar) : sizeof(char));
*aResult = sum;
return NS_OK;
}
#endif
//----------------------------------------------------------------------

View File

@ -214,10 +214,6 @@ public:
NS_IMETHOD GetListenerManager(nsIEventListenerManager** aInstancePtrResult);
NS_IMETHOD DoneCreatingElement();
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const;
NS_IMETHOD CanContainChildren(PRBool& aResult) const;
NS_IMETHOD ChildCount(PRInt32& aResult) const;

View File

@ -51,7 +51,6 @@
#include "nsIEventListenerManager.h"
#include "nsILinkHandler.h"
#include "nsIScriptGlobalObject.h"
#include "nsISizeOfHandler.h"
#include "nsISupportsArray.h"
#include "nsIURL.h"
#include "nsNetUtil.h"
@ -2006,14 +2005,6 @@ nsGenericElement::HandleDOMEvent(nsIPresContext* aPresContext,
return ret;
}
#ifdef DEBUG
PRUint32
nsGenericElement::BaseSizeOf(nsISizeOfHandler *aSizer) const
{
return 0;
}
#endif
NS_IMETHODIMP
nsGenericElement::GetContentID(PRUint32* aID)
{
@ -3103,20 +3094,6 @@ struct nsGenericAttribute
NS_IF_RELEASE(mNodeInfo);
}
#ifdef DEBUG
nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
PRUint32 sum = sizeof(*this) - sizeof(mValue);
PRUint32 ssize;
mValue.SizeOf(aSizer, &ssize);
sum += ssize;
*aResult = sum;
return NS_OK;
}
#endif
nsINodeInfo* mNodeInfo;
nsString mValue;
};
@ -3981,31 +3958,3 @@ nsGenericContainerElement::RemoveChildAt(PRInt32 aIndex, PRBool aNotify)
return NS_OK;
}
#ifdef DEBUG
PRUint32
nsGenericContainerElement::BaseSizeOf(nsISizeOfHandler *aSizer) const
{
PRUint32 sum = 0;
if (mAttributes) {
// Add in array of attributes size
PRUint32 asize;
mAttributes->SizeOf(aSizer, &asize);
sum += asize;
// Add in each attributes size
PRInt32 i, n = mAttributes->Count();
for (i = 0; i < n; i++) {
const nsGenericAttribute* attr = (const nsGenericAttribute*)
mAttributes->ElementAt(i);
if (attr) {
PRUint32 asum = 0;
attr->SizeOf(aSizer, &asum);
sum += asum;
}
}
}
return sum;
}
#endif

View File

@ -592,10 +592,6 @@ public:
static PLDHashTable sRangeListsHash;
protected:
#ifdef DEBUG
virtual PRUint32 BaseSizeOf(nsISizeOfHandler *aSizer) const;
#endif
PRBool HasDOMSlots() const
{
return !(mFlagsOrSlots & GENERIC_ELEMENT_DOESNT_HAVE_DOMSLOTS);
@ -805,10 +801,6 @@ public:
#endif
protected:
#ifdef DEBUG
virtual PRUint32 BaseSizeOf(nsISizeOfHandler *aSizer) const;
#endif
/**
* The attributes (stored as nsGenericAttribute*)
* @see nsGenericAttribute

View File

@ -47,7 +47,6 @@
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
#include "nsIPresShell.h"
#include "nsLayoutAtoms.h"
#include "prenv.h"
@ -735,70 +734,6 @@ void nsStyleContext::List(FILE* out, PRInt32 aIndent)
}
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsStyleContext's size):
* 1) sizeof(*this) which gets all of the data members
* 2) adds in the size of the PseudoTag, if there is one
*
* Children / siblings / parents:
* 1) We recurse over the mChild and mEmptyChild instances if they exist.
* These instances will then be accumulated seperately (not part of
* the containing instance's size)
* 2) We recurse over the siblings of the Child and Empty Child instances
* and count then seperately as well.
* 3) We recurse over our direct siblings (if any).
*
******************************************************************************/
void nsStyleContext::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
// object has already been accounted for
return;
}
PRUint32 localSize=0;
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("nsStyleContext");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// add in the size of the member mPseudoTag
if (mPseudoTag){
mPseudoTag->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
aSizeOfHandler->AddSize(tag,aSize);
// now follow up with the child (and empty child) recursion
if (nsnull != mChild) {
nsStyleContext* child = mChild;
do {
child->SizeOf(aSizeOfHandler, localSize);
child = child->mNextSibling;
} while (mChild != child);
}
if (nsnull != mEmptyChild) {
nsStyleContext* child = mEmptyChild;
do {
child->SizeOf(aSizeOfHandler, localSize);
child = child->mNextSibling;
} while (mEmptyChild != child);
}
// and finally our direct siblings (if any)
if (nsnull != mNextSibling) {
mNextSibling->SizeOf(aSizeOfHandler, localSize);
}
}
static void IndentBy(FILE* out, PRInt32 aIndent) {
while (--aIndent >= 0) fputs(" ", out);
}

View File

@ -71,8 +71,6 @@
#define STYLESET_STOP_TIMER(a) ((void)0)
#endif
#include "nsISizeOfHandler.h"
// =====================================================
// nsRuleNodeList
// A class that represents a chain of rule nodes
@ -291,8 +289,6 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0);
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
virtual void ResetUniqueStyleItems(void);
@ -1966,191 +1962,3 @@ StyleSetImpl::AttributeAffectsStyle(nsIAtom *aAttribute, nsIContent *aContent,
return NS_OK;
}
#ifdef DEBUG
/******************************************************************************
* SizeOf method:
*
* Self (reported as StyleSetImpl's size):
* 1) sizeof(*this) + sizeof (overhead only) each collection that exists
* and the FrameConstructor overhead
*
* Contained / Aggregated data (not reported as StyleSetImpl's size):
* 1) Override Sheets, DocSheets, UserSheets, AgentSheets, RuleProcessors, Recycler
* are all delegated to.
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void StyleSetImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
NS_ASSERTION(0, "StyleSet has already been conted in SizeOf operation");
// styleset has already been accounted for
return;
}
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("StyleSet");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(StyleSetImpl);
// Next get the size of the OVERHEAD of objects we will delegate to:
if (mOverrideSheets && uniqueItems->AddItem(mOverrideSheets)){
aSize += sizeof(*mOverrideSheets);
}
if (mDocSheets && uniqueItems->AddItem(mDocSheets)){
aSize += sizeof(*mDocSheets);
}
if (mUserSheets && uniqueItems->AddItem(mUserSheets)){
aSize += sizeof(*mUserSheets);
}
if (mAgentSheets && uniqueItems->AddItem(mAgentSheets)){
aSize += sizeof(*mAgentSheets);
}
if (mAgentRuleProcessors && uniqueItems->AddItem(mAgentRuleProcessors)){
aSize += sizeof(*mAgentRuleProcessors);
}
if (mUserRuleProcessors && uniqueItems->AddItem(mUserRuleProcessors)){
aSize += sizeof(*mUserRuleProcessors);
}
if (mDocRuleProcessors && uniqueItems->AddItem(mDocRuleProcessors)){
aSize += sizeof(*mDocRuleProcessors);
}
if (mOverrideRuleProcessors && uniqueItems->AddItem(mOverrideRuleProcessors)){
aSize += sizeof(*mOverrideRuleProcessors);
}
if (mRecycler && uniqueItems->AddItem(mRecycler)){
aSize += sizeof(*mRecycler);
}
if (mQuirkStyleSheet) {
aSize += sizeof(mQuirkStyleSheet); // just the pointer: the sheet is counted elsewhere
}
///////////////////////////////////////////////
// now the FrameConstructor
if(mFrameConstructor && uniqueItems->AddItem((void*)mFrameConstructor)){
aSize += sizeof(mFrameConstructor);
}
aSizeOfHandler->AddSize(tag,aSize);
///////////////////////////////////////////////
// Now travers the collections and delegate
PRInt32 numSheets, curSheet;
PRUint32 localSize=0;
numSheets = GetNumberOfOverrideStyleSheets();
for(curSheet=0; curSheet < numSheets; curSheet++){
nsIStyleSheet* pSheet = GetOverrideStyleSheetAt(curSheet); //addref
if(pSheet){
localSize=0;
pSheet->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(pSheet);
}
numSheets = GetNumberOfDocStyleSheets();
for(curSheet=0; curSheet < numSheets; curSheet++){
nsIStyleSheet* pSheet = GetDocStyleSheetAt(curSheet);
if(pSheet){
localSize=0;
pSheet->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(pSheet);
}
numSheets = GetNumberOfUserStyleSheets();
for(curSheet=0; curSheet < numSheets; curSheet++){
nsIStyleSheet* pSheet = GetUserStyleSheetAt(curSheet);
if(pSheet){
localSize=0;
pSheet->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(pSheet);
}
numSheets = GetNumberOfAgentStyleSheets();
for(curSheet=0; curSheet < numSheets; curSheet++){
nsIStyleSheet* pSheet = GetAgentStyleSheetAt(curSheet);
if(pSheet){
localSize=0;
pSheet->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(pSheet);
}
///////////////////////////////////////////////
// rule processors
PRUint32 numRuleProcessors,curRuleProcessor;
if(mAgentRuleProcessors){
mAgentRuleProcessors->Count(&numRuleProcessors);
for(curRuleProcessor=0; curRuleProcessor < numRuleProcessors; curRuleProcessor++){
nsIStyleRuleProcessor* processor =
(nsIStyleRuleProcessor* )mAgentRuleProcessors->ElementAt(curRuleProcessor);
if(processor){
localSize=0;
processor->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(processor);
}
}
if(mUserRuleProcessors){
mUserRuleProcessors->Count(&numRuleProcessors);
for(curRuleProcessor=0; curRuleProcessor < numRuleProcessors; curRuleProcessor++){
nsIStyleRuleProcessor* processor =
(nsIStyleRuleProcessor* )mUserRuleProcessors->ElementAt(curRuleProcessor);
if(processor){
localSize=0;
processor->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(processor);
}
}
if(mDocRuleProcessors){
mDocRuleProcessors->Count(&numRuleProcessors);
for(curRuleProcessor=0; curRuleProcessor < numRuleProcessors; curRuleProcessor++){
nsIStyleRuleProcessor* processor =
(nsIStyleRuleProcessor* )mDocRuleProcessors->ElementAt(curRuleProcessor);
if(processor){
localSize=0;
processor->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(processor);
}
}
if(mOverrideRuleProcessors){
mOverrideRuleProcessors->Count(&numRuleProcessors);
for(curRuleProcessor=0; curRuleProcessor < numRuleProcessors; curRuleProcessor++){
nsIStyleRuleProcessor* processor =
(nsIStyleRuleProcessor* )mOverrideRuleProcessors->ElementAt(curRuleProcessor);
if(processor){
localSize=0;
processor->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(processor);
}
}
///////////////////////////////////////////////
// and the recycled ones too
if(mRecycler){
mRecycler->Count(&numRuleProcessors);
for(curRuleProcessor=0; curRuleProcessor < numRuleProcessors; curRuleProcessor++){
nsIStyleRuleProcessor* processor =
(nsIStyleRuleProcessor* )mRecycler->ElementAt(curRuleProcessor);
if(processor && uniqueItems->AddItem((void*)processor)){
localSize=0;
processor->SizeOf(aSizeOfHandler, localSize);
}
NS_IF_RELEASE(processor);
}
}
// XXX - do the stylecontext cache too
// now delegate the sizeof to the larger or more complex aggregated objects
// - none
}
#endif

View File

@ -42,7 +42,6 @@
#include "nsAString.h"
class nsIFormControl;
class nsISizeOfHandler;
class nsIDOMHTMLInputElement;
class nsIRadioVisitor;
class nsISimpleEnumerator;

View File

@ -131,16 +131,3 @@ GenericElementCollection::ParentDestroyed()
return NS_OK;
}
#ifdef DEBUG
nsresult
GenericElementCollection::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = sizeof(*this);
return NS_OK;
}
#endif

View File

@ -43,9 +43,6 @@
#include "nsIAtom.h"
class nsIContent;
#ifdef DEBUG
class nsISizeOfHandler;
#endif
/**
* This class provides a late-bound collection of elements that are
@ -65,10 +62,6 @@ public:
NS_IMETHOD ParentDestroyed();
#ifdef DEBUG
nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsIContent* mParent;
nsCOMPtr<nsIAtom> mTag;

View File

@ -52,7 +52,6 @@
#include "nsCRT.h"
#include "nsIEventStateManager.h"
#include "nsIPrivateDOMEvent.h"
#include "nsISizeOfHandler.h"
#include "nsIDOMEvent.h"
#include "nsIDOMText.h"
#include "nsIDOMScriptObjectFactory.h"
@ -157,7 +156,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const { return NS_OK; }
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const { return NS_OK; }
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext,
nsEvent* aEvent,
@ -541,13 +539,3 @@ nsAttributeContent::CloneContent(PRBool aCloneText, nsITextContent** aReturn)
it->mText = mText;
return result;
}
#ifdef DEBUG
NS_IMETHODIMP
nsAttributeContent::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) return NS_ERROR_NULL_POINTER;
*aResult = sizeof(*this);
return NS_OK;
}
#endif

View File

@ -64,7 +64,6 @@
#include "nsILink.h"
#include "nsILinkHandler.h"
#include "nsPIDOMWindow.h"
#include "nsISizeOfHandler.h"
#include "nsIStyleRule.h"
#include "nsISupportsArray.h"
#include "nsIURL.h"
@ -2541,21 +2540,6 @@ nsGenericHTMLElement::IsContentOfType(PRUint32 aFlags)
return !(aFlags & ~(eELEMENT | eHTML));
}
#ifdef DEBUG
PRUint32
nsGenericHTMLElement::BaseSizeOf(nsISizeOfHandler* aSizer) const
{
PRUint32 sum = 0;
if (mAttributes) {
PRUint32 attrs = 0;
mAttributes->SizeOf(aSizer, attrs);
sum += attrs;
}
return sum;
}
#endif
//----------------------------------------------------------------------

View File

@ -237,8 +237,6 @@ public:
#ifdef DEBUG
void ListAttributes(FILE* out) const;
PRUint32 BaseSizeOf(nsISizeOfHandler* aSizer) const;
#endif
/**

View File

@ -128,10 +128,6 @@ public:
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
// The cached visited state
nsLinkState mLinkState;
@ -398,17 +394,6 @@ nsHTMLAnchorElement::SetTarget(const nsAString& aValue)
return SetAttr(kNameSpaceID_None, nsHTMLAtoms::target, aValue, PR_TRUE);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLAnchorElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
NS_IMETHODIMP
nsHTMLAnchorElement::GetProtocol(nsAString& aProtocol)
{

View File

@ -85,10 +85,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
PRBool mReflectedApplet;
};
@ -253,13 +249,3 @@ nsHTMLAppletElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMap
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLAppletElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -104,9 +104,6 @@ public:
PRBool aNotify);
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
// The cached visited state
@ -358,16 +355,6 @@ nsHTMLAreaElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
return nsGenericHTMLElement::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLAreaElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
NS_IMETHODIMP
nsHTMLAreaElement::GetProtocol(nsAString& aProtocol)
{

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -235,13 +232,3 @@ nsHTMLBRElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRule
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLBRElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -68,9 +68,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -220,14 +217,3 @@ nsHTMLBaseFontElement::GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt
}
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLBaseFontElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -62,7 +62,6 @@
#include "nsIFrameManager.h"
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
#include "nsIView.h"
#include "nsLayoutAtoms.h"
#include "nsRuleWalker.h"
@ -86,8 +85,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
nsHTMLBodyElement* mPart; // not ref-counted, cleared by content
@ -127,9 +124,6 @@ public:
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
BodyRule* mContentStyleRule;
@ -278,45 +272,6 @@ BodyRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as BodyRule's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as BodyRule's size):
* 1) delegate to mSheet if it exists
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void BodyRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("BodyRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
aSizeOfHandler->AddSize(tag, aSize);
if(mSheet){
mSheet->SizeOf(aSizeOfHandler, localSize);
}
return;
}
#endif
//----------------------------------------------------------------------
@ -672,13 +627,3 @@ nsHTMLBodyElement::GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 a
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLBodyElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -55,7 +55,6 @@
#include "nsIEventStateManager.h"
#include "nsIDOMEvent.h"
#include "nsIDOMNSEvent.h"
#include "nsISizeOfHandler.h"
#include "nsIDocument.h"
#include "nsGUIEvent.h"
#include "nsUnicharUtils.h"
@ -111,9 +110,6 @@ public:
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
PRInt8 mType;
@ -635,16 +631,6 @@ nsHTMLButtonElement::HandleDOMEvent(nsIPresContext* aPresContext,
return ret;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLButtonElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLButtonElement::GetDefaultValue(nsAString& aDefaultValue)
{

View File

@ -74,9 +74,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -197,13 +194,3 @@ nsHTMLDListElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLDListElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLModElement
NS_DECL_NSIDOMHTMLMODELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -150,14 +146,3 @@ nsHTMLDelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLDelElement, Cite, cite)
NS_IMPL_STRING_ATTR(nsHTMLDelElement, DateTime, datetime)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLDelElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -81,9 +81,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -244,13 +241,3 @@ nsHTMLDirectoryElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& a
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLDirectoryElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -79,9 +79,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -238,13 +235,3 @@ nsHTMLDivElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRul
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLDivElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -45,7 +45,6 @@
#include "nsIPresContext.h"
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsISizeOfHandler.h"
class nsHTMLFieldSetElement : public nsGenericHTMLContainerFormElement,
@ -75,11 +74,6 @@ public:
NS_IMETHOD Reset();
NS_IMETHOD SubmitNamesValues(nsIFormSubmission* aFormSubmission,
nsIContent* aSubmitElement);
#ifdef DEBUG
// nsIContent
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
// construction, destruction
@ -173,18 +167,6 @@ nsHTMLFieldSetElement::GetForm(nsIDOMHTMLFormElement** aForm)
// nsIFormControl
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLFieldSetElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLFieldSetElement::Reset()
{

View File

@ -79,9 +79,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -333,13 +330,3 @@ nsHTMLFontElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRu
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLFontElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -53,7 +53,6 @@
#include "nsIPresShell.h"
#include "nsIFrame.h"
#include "nsIFormControlFrame.h"
#include "nsISizeOfHandler.h"
#include "nsIScriptGlobalObject.h"
#include "nsDOMError.h"
#include "nsContentUtils.h"
@ -178,10 +177,6 @@ public:
NS_IMETHOD RemoveFromRadioGroup(const nsAString& aName,
nsIFormControl* aRadio);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
// nsIContent
NS_IMETHOD StringToAttribute(nsIAtom* aAttribute,
const nsAString& aValue,
@ -348,10 +343,6 @@ public:
nsresult IndexOfControl(nsIFormControl* aControl,
PRInt32* aIndex);
#ifdef DEBUG
nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
nsIDOMHTMLFormElement* mForm; // WEAK - the form owns me
nsAutoVoidArray mElements; // Holds WEAK references - bug 36639
@ -1864,27 +1855,6 @@ nsFormControlList::RemoveElementFromTable(nsIFormControl* aChild,
return NS_OK;
}
#ifdef DEBUG
nsresult
nsFormControlList::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) return NS_ERROR_NULL_POINTER;
PRUint32 asize;
mElements.SizeOf(aSizer, &asize);
*aResult = sizeof(*this) - sizeof(mElements) + asize;
return NS_OK;
}
NS_IMETHODIMP
nsHTMLFormElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
// nsFormControlEnumerator
NS_IMPL_ISUPPORTS1(nsFormControlEnumerator, nsISimpleEnumerator);

View File

@ -88,9 +88,6 @@ public:
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
nsAString& aResult) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -287,16 +284,6 @@ nsHTMLFrameElement::AttributeToString(nsIAtom* aAttribute,
aResult);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
//*****************************************************************************
// nsHTMLFrameElement::nsIChromeEventHandler

View File

@ -89,9 +89,6 @@ public:
nsAString& aResult) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
private:
nsresult ParseRowCol(const nsAString& aValue,
PRInt32& aNumSpecs,
@ -397,17 +394,6 @@ nsHTMLFrameSetElement::GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLFrameSetElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLFrameSetElement::ParseRowCol(const nsAString & aValue,
PRInt32& aNumSpecs,

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -298,13 +295,3 @@ nsHTMLHRElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRule
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLHRElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLHeadElement
NS_DECL_NSIDOMHTMLHEADELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -149,14 +145,3 @@ nsHTMLHeadElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLHeadElement, Profile, profile)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLHeadElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -222,13 +219,3 @@ nsHTMLHeadingElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMa
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLHeadingElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -66,10 +66,6 @@ public:
// nsIDOMHTMLHtmlElement
NS_DECL_NSIDOMHTMLHTMLELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
@ -152,14 +148,3 @@ nsHTMLHtmlElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLHtmlElement, Version, version)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLHtmlElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -117,9 +117,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
// This doesn't really ensure a frame loade in all cases, only when
@ -523,16 +520,6 @@ nsHTMLIFrameElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMap
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLIFrameElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
//*****************************************************************************
// nsHTMLIFrameElement::nsIChromeEventHandler

View File

@ -132,9 +132,6 @@ public:
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsresult SetSrcInner(nsIURI* aBaseURL, const nsAString& aSrc);
@ -897,16 +894,6 @@ nsHTMLImageElement::SetSrc(const nsAString& aSrc)
return rv;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLImageElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
NS_IMETHODIMP
nsHTMLImageElement::GetNaturalHeight(PRInt32* aNaturalHeight)
{

View File

@ -67,7 +67,6 @@
#include "nsIFormControlFrame.h"
#include "nsIFrame.h"
#include "nsIEventStateManager.h"
#include "nsISizeOfHandler.h"
#include "nsIServiceManager.h"
#include "nsIScriptSecurityManager.h"
#include "nsDOMError.h"
@ -186,10 +185,6 @@ public:
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
NS_IMETHOD SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, PRBool aNotify) {
BeforeSetAttr(aNameSpaceID, aName, &aValue, aNotify);
@ -2022,19 +2017,6 @@ nsHTMLInputElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
}
// nsIFormControl
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLInputElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
// Controllers Methods
NS_IMETHODIMP

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLModElement
NS_DECL_NSIDOMHTMLMODELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -150,14 +146,3 @@ nsHTMLInsElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLInsElement, Cite, cite)
NS_IMPL_STRING_ATTR(nsHTMLInsElement, DateTime, datetime)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLInsElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -261,13 +258,3 @@ nsHTMLLIElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRule
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLLIElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -49,7 +49,6 @@
#include "nsIDOMHTMLDocument.h"
#include "nsIDOMXULDocument.h"
#include "nsIDocument.h"
#include "nsISizeOfHandler.h"
#include "nsIFormControlFrame.h"
#include "nsIPresShell.h"
#include "nsGUIEvent.h"
@ -187,9 +186,6 @@ public:
PRBool aNotify);
NS_IMETHOD UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRBool aNotify);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
already_AddRefed<nsIContent> GetForContent();
@ -425,16 +421,6 @@ nsHTMLLabelElement::SetFocus(nsIPresContext* aContext)
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLLabelElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLLabelElement::Reset()
{

View File

@ -45,7 +45,6 @@
#include "nsIPresContext.h"
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsISizeOfHandler.h"
class nsHTMLLegendElement : public nsGenericHTMLContainerFormElement,
@ -83,9 +82,6 @@ public:
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
const nsHTMLValue& aValue,
nsAString& aResult) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -215,16 +211,6 @@ nsHTMLLegendElement::AttributeToString(nsIAtom* aAttribute,
aValue, aResult);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLLegendElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLLegendElement::Reset()
{

View File

@ -183,9 +183,6 @@ public:
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
virtual void GetStyleSheetURL(PRBool* aIsInline,
@ -362,16 +359,6 @@ nsHTMLLinkElement::HandleDOMEvent(nsIPresContext* aPresContext,
aFlags, aEventStatus);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLLinkElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
NS_IMETHODIMP
nsHTMLLinkElement::GetLinkState(nsLinkState &aState)
{

View File

@ -74,9 +74,6 @@ public:
nsChangeHint& aHint) const;
NS_IMETHOD SetDocument(nsIDocument* aDocument, PRBool aDeep,
PRBool aCompileEventHandlers);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
GenericElementCollection* mAreas;
@ -227,13 +224,3 @@ nsHTMLMapElement::GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aM
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLMapElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -82,9 +82,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -241,13 +238,3 @@ nsHTMLMenuElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRu
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLMenuElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLMetaElement
NS_DECL_NSIDOMHTMLMETAELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -153,14 +149,3 @@ NS_IMPL_STRING_ATTR(nsHTMLMetaElement, Content, content)
NS_IMPL_STRING_ATTR(nsHTMLMetaElement, HttpEquiv, httpEquiv)
NS_IMPL_STRING_ATTR(nsHTMLMetaElement, Name, name)
NS_IMPL_STRING_ATTR(nsHTMLMetaElement, Scheme, scheme)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLMetaElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLModElement
NS_DECL_NSIDOMHTMLMODELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -150,14 +146,3 @@ nsHTMLModElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLModElement, Cite, cite)
NS_IMPL_STRING_ATTR(nsHTMLModElement, DateTime, datetime)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLModElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -278,13 +275,3 @@ nsHTMLOListElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLOListElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -86,9 +86,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -324,13 +321,3 @@ nsHTMLObjectElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMap
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLObjectElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -86,9 +86,6 @@ public:
NS_IMETHOD HandleDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
nsIDOMEvent** aDOMEvent, PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
@ -216,18 +213,6 @@ nsHTMLOptGroupElement::HandleDOMEvent(nsIPresContext* aPresContext,
aEventStatus);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLOptGroupElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
void
nsHTMLOptGroupElement::GetSelect(nsISelectElement **aSelectElement)
{

View File

@ -106,9 +106,6 @@ public:
nsHTMLValue& aResult);
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
// nsIOptionElement
NS_IMETHOD SetSelectedInternal(PRBool aValue, PRBool aNotify);
@ -800,13 +797,3 @@ nsHTMLOptionElement::Initialize(JSContext* aContext,
return result;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLOptionElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -79,9 +79,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -224,14 +221,3 @@ nsHTMLParagraphElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& a
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLParagraphElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -78,9 +78,6 @@ public:
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -280,13 +277,3 @@ nsHTMLPreElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRul
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLPreElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
// nsIDOMHTMLQuoteElement
NS_DECL_NSIDOMHTMLQUOTEELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -148,14 +144,3 @@ nsHTMLQuoteElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
NS_IMPL_STRING_ATTR(nsHTMLQuoteElement, Cite, cite)
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLQuoteElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -358,10 +358,6 @@ public:
virtual nsresult GetInnerHTML(nsAString& aInnerHTML);
virtual nsresult SetInnerHTML(const nsAString& aInnerHTML);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
PRUint32 mLineNumber;
PRPackedBool mIsEvaluated;
@ -597,17 +593,6 @@ nsHTMLScriptElement::SetInnerHTML(const nsAString& aInnerHTML)
return ReplaceContentsWithText(aInnerHTML, PR_TRUE);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLScriptElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
/* void scriptAvailable (in nsresult aResult, in nsIDOMHTMLScriptElement aElement, in nsIURI aURI, in PRInt32 aLineNo, in PRUint32 aScriptLength, [size_is (aScriptLength)] in wstring aScript); */
NS_IMETHODIMP
nsHTMLScriptElement::ScriptAvailable(nsresult aResult,

View File

@ -235,9 +235,6 @@ public:
PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
NS_IMETHOD SetFocus(nsIPresContext* aPresContext);
NS_IMETHOD RemoveFocus(nsIPresContext* aPresContext);
@ -2416,13 +2413,3 @@ nsHTMLOptionCollection::IndexOf(nsIContent* aOption)
return mElements->IndexOf(aOption);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLSelectElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -99,10 +99,6 @@ public:
PRInt32 aModType,
PRInt32& aHint) const;
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -448,15 +444,3 @@ nsHTMLSharedContainerElement::GetAttributeMappingFunction(nsMapRuleToAttributesF
return
nsGenericHTMLContainerElement::GetAttributeMappingFunction(aMapRuleFunc);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLSharedContainerElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -103,10 +103,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32 aModType, nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -456,15 +452,3 @@ nsHTMLSharedLeafElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc&
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLSharedLeafElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -103,10 +103,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute,
PRInt32 aModType, nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -456,15 +452,3 @@ nsHTMLSharedLeafElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc&
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLSharedLeafElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -86,9 +86,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -324,13 +321,3 @@ nsHTMLObjectElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMap
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLObjectElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -65,10 +65,6 @@ public:
nsresult GetInnerHTML(nsAString& aInnerHTML);
nsresult SetInnerHTML(const nsAString& aInnerHTML);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -169,13 +165,3 @@ nsHTMLSpanElement::SetInnerHTML(const nsAString& aInnerHTML)
return nsGenericHTMLContainerElement::SetInnerHTML(aInnerHTML);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLSpanElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -165,10 +165,6 @@ public:
nsresult GetInnerHTML(nsAString& aInnerHTML);
nsresult SetInnerHTML(const nsAString& aInnerHTML);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsresult GetHrefCString(char* &aBuf);
@ -316,16 +312,6 @@ nsHTMLStyleElement::SetInnerHTML(const nsAString& aInnerHTML)
UpdateStyleSheet();
return rv;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLStyleElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
nsresult
nsHTMLStyleElement::GetHrefCString(char* &aBuf)

View File

@ -76,9 +76,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -238,14 +235,3 @@ nsHTMLTableCaptionElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableCaptionElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -85,9 +85,6 @@ public:
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
// This does not return a nsresult since all we care about is if we
@ -538,14 +535,3 @@ nsHTMLTableCellElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& a
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableCellElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -85,9 +85,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -372,14 +369,3 @@ NS_METHOD nsHTMLTableColElement::GetSpanValue(PRInt32* aSpan)
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableColElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -91,9 +91,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
GenericElementCollection *mTBodies;
@ -119,12 +116,6 @@ public:
NS_IMETHOD ParentDestroyed();
#ifdef DEBUG
void SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
*aResult = sizeof(*this);
}
#endif
protected:
nsHTMLTableElement * mParent;
};
@ -1558,13 +1549,3 @@ nsHTMLTableElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -187,9 +187,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsresult GetSection(nsIDOMHTMLTableSectionElement** aSection);
@ -662,14 +659,3 @@ nsHTMLTableRowElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aM
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableRowElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -81,9 +81,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
GenericElementCollection *mRows;
@ -418,14 +415,3 @@ nsHTMLTableSectionElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTableSectionElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -57,7 +57,6 @@
#include "nsIFormControlFrame.h"
#include "nsITextControlFrame.h"
#include "nsIEventStateManager.h"
#include "nsISizeOfHandler.h"
#include "nsLinebreakConverter.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
@ -141,10 +140,6 @@ public:
nsresult GetInnerHTML(nsAString& aInnerHTML);
nsresult SetInnerHTML(const nsAString& aInnerHTML);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
nsCOMPtr<nsIControllers> mControllers;
/** The current value. This is null if the frame owns the value. */
@ -785,19 +780,6 @@ nsHTMLTextAreaElement::SetInnerHTML(const nsAString& aInnerHTML)
return ReplaceContentsWithText(aInnerHTML, PR_TRUE);
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTextAreaElement::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif
// Controllers Methods
NS_IMETHODIMP

View File

@ -68,10 +68,6 @@ public:
// nsIDOMHTMLTitleElement
NS_DECL_NSIDOMHTMLTITLEELEMENT
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -198,13 +194,3 @@ nsHTMLTitleElement::SetText(const nsAString& aTitle)
return result;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLTitleElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -79,9 +79,6 @@ public:
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
NS_IMETHOD GetMappedAttributeImpact(const nsIAtom* aAttribute, PRInt32 aModType,
nsChangeHint& aHint) const;
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -259,13 +256,3 @@ nsHTMLUListElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapR
aMapRuleFunc = &MapAttributesIntoRule;
return NS_OK;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLUListElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -72,9 +72,6 @@ public:
NS_IMETHOD SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, PRBool aNotify);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
};
nsresult
@ -229,13 +226,3 @@ nsHTMLUnknownElement::SetAttribute(PRInt32 aNameSpaceID,
return result;
}
#ifdef DEBUG
NS_IMETHODIMP
nsHTMLUnknownElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
*aResult = sizeof(*this) + BaseSizeOf(aSizer);
return NS_OK;
}
#endif

View File

@ -51,7 +51,6 @@
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
// #define DEBUG_REFS
@ -6103,102 +6102,6 @@ void nsCSSDeclaration::List(FILE* out, PRInt32 aIndent) const
mImportant->List(out, 0);
}
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsCSSDeclaration's size):
* 1) sizeof(*this) + the sizeof each non-null attribute
*
* Contained / Aggregated data (not reported as nsCSSDeclaration's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void nsCSSDeclaration::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("nsCSSDeclaration");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// now add in all of the contained objects, checking for duplicates on all of them
CSS_VARONSTACK_GET(Font);
if(theFont && uniqueItems->AddItem(theFont)){
aSize += sizeof(*theFont);
}
CSS_VARONSTACK_GET(Color);
if(theColor && uniqueItems->AddItem(theColor)){
aSize += sizeof(*theColor);
}
CSS_VARONSTACK_GET(Text);
if(theText && uniqueItems->AddItem(theText)){
aSize += sizeof(*theText);
}
CSS_VARONSTACK_GET(Margin);
if(theMargin && uniqueItems->AddItem(theMargin)){
aSize += sizeof(*theMargin);
}
CSS_VARONSTACK_GET(Position);
if(thePosition && uniqueItems->AddItem(thePosition)){
aSize += sizeof(*thePosition);
}
CSS_VARONSTACK_GET(List);
if(theList && uniqueItems->AddItem(theList)){
aSize += sizeof(*theList);
}
CSS_VARONSTACK_GET(Display);
if(theDisplay && uniqueItems->AddItem(theDisplay)){
aSize += sizeof(*theDisplay);
}
CSS_VARONSTACK_GET(Table);
if(theTable && uniqueItems->AddItem(theTable)){
aSize += sizeof(*theTable);
}
CSS_VARONSTACK_GET(Breaks);
if(theBreaks && uniqueItems->AddItem(theBreaks)){
aSize += sizeof(*theBreaks);
}
CSS_VARONSTACK_GET(Page);
if(thePage && uniqueItems->AddItem(thePage)){
aSize += sizeof(*thePage);
}
CSS_VARONSTACK_GET(Content);
if(theContent && uniqueItems->AddItem(theContent)){
aSize += sizeof(*theContent);
}
CSS_VARONSTACK_GET(UserInterface);
if(theUserInterface && uniqueItems->AddItem(theUserInterface)){
aSize += sizeof(*theUserInterface);
}
#ifdef INCLUDE_XUL
CSS_VARONSTACK_GET(XUL);
if(theXUL && uniqueItems->AddItem(theXUL)){
aSize += sizeof(*theXUL);
}
#endif
#ifdef MOZ_SVG
CSS_VARONSTACK_GET(SVG);
if(theSVG && uniqueItems->AddItem(theSVG)){
aSize += sizeof(*theSVG);
}
#endif
CSS_VARONSTACK_GET(Aural);
if(theAural && uniqueItems->AddItem(theAural)){
aSize += sizeof(*theAural);
}
aSizeOfHandler->AddSize(tag, aSize);
}
#endif
PRUint32

View File

@ -49,7 +49,6 @@
#include "nsVoidArray.h"
#include "nsValueArray.h"
class nsISizeOfHandler;
class nsStringArray;
struct nsCSSStruct {
@ -653,8 +652,6 @@ public:
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
protected:

View File

@ -51,7 +51,6 @@
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
#include "nsIDOMCSSStyleSheet.h"
#include "nsIDOMCSSRule.h"
#include "nsIDOMCSSImportRule.h"
@ -180,8 +179,6 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
// nsICSSRule methods
@ -243,42 +240,6 @@ CSSCharsetRuleImpl::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSCharSetRuleImpl's size):
* 1) sizeof(*this) + the size of the mEncoding string
*
* Contained / Aggregated data (not reported as CSSCharsetRuleImpl's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSCharsetRuleImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSCharsetRuleImpl");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// add the string for encoding value
mEncoding.SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
aSize -= sizeof(mEncoding); // counted in sizeof(*this) and nsString->SizeOf()
aSizeOfHandler->AddSize(tag,aSize);
}
#endif
NS_IMETHODIMP
@ -395,8 +356,6 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
// nsICSSRule methods
@ -491,44 +450,6 @@ CSSImportRuleImpl::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSImportRuleImpl's size):
* 1) sizeof(*this) + the size of the mURLSpec string
*
* Contained / Aggregated data (not reported as CSSImportRuleImpl's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSImportRuleImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSImportRuleImpl");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// add the strings for the URLSpec and the Media
mURLSpec.SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
aSize -= sizeof(mURLSpec); // counted in sizeof(*this) and nsString->SizeOf()
aSizeOfHandler->AddSize(tag,aSize);
}
#endif
NS_IMETHODIMP
@ -726,8 +647,6 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
// nsICSSRule methods
@ -905,64 +824,6 @@ CSSMediaRuleImpl::List(FILE* out, PRInt32 aIndent) const
fputs("}\n", out);
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSMediaRuleImpl's size):
* 1) sizeof(*this) + the size of each unique atom in the mMedia collection
*
* Contained / Aggregated data (not reported as CSSMediaRuleImpl's size):
* 1) Delegate to the rules in the mRules collection to report theri own size
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSMediaRuleImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSMediaRuleImpl");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
if (mMedia) {
// get the sizes of the media atoms (if unique)
PRUint32 index = 0;
PRUint32 count;
mMedia->Count(&count);
while (index < count) {
nsCOMPtr<nsIAtom> medium = dont_AddRef((nsIAtom*)mMedia->ElementAt(index++));
if(medium && uniqueItems->AddItem(medium)){
medium->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
}
}
// we are done with the size we report for ourself
aSizeOfHandler->AddSize(tag,aSize);
if (mRules) {
// delegate to the rules themselves (do not sum into our size)
PRUint32 index = 0;
PRUint32 count;
mRules->Count(&count);
while (index < count) {
nsCOMPtr<nsICSSRule> rule = dont_AddRef((nsICSSRule*)mRules->ElementAt(index++));
rule->SizeOf(aSizeOfHandler, localSize);
}
}
}
#endif
NS_IMETHODIMP
@ -1269,8 +1130,6 @@ public:
// nsIStyleRule methods
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
// nsICSSRule methods
@ -1348,49 +1207,6 @@ CSSNameSpaceRuleImpl::List(FILE* out, PRInt32 aIndent) const
fputs(")\n", out);
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSNamespaceRuleImpl's size):
* 1) sizeof(*this) + the size of the mURLSpec string +
* the sizeof the mPrefix atom (if it ieists)
*
* Contained / Aggregated data (not reported as CSSNamespaceRuleImpl's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSNameSpaceRuleImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSNameSpaceRuleImpl");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// get the member data as part of this dump
mURLSpec.SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
aSize -= sizeof(mURLSpec); // counted in sizeof(*this) and nsString->SizeOf()
if(mPrefix && uniqueItems->AddItem(mPrefix)){
mPrefix->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
aSizeOfHandler->AddSize(tag, aSize);
}
#endif
NS_IMETHODIMP

View File

@ -51,7 +51,6 @@
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
// #define DEBUG_REFS
@ -6103,102 +6102,6 @@ void nsCSSDeclaration::List(FILE* out, PRInt32 aIndent) const
mImportant->List(out, 0);
}
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsCSSDeclaration's size):
* 1) sizeof(*this) + the sizeof each non-null attribute
*
* Contained / Aggregated data (not reported as nsCSSDeclaration's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void nsCSSDeclaration::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("nsCSSDeclaration");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// now add in all of the contained objects, checking for duplicates on all of them
CSS_VARONSTACK_GET(Font);
if(theFont && uniqueItems->AddItem(theFont)){
aSize += sizeof(*theFont);
}
CSS_VARONSTACK_GET(Color);
if(theColor && uniqueItems->AddItem(theColor)){
aSize += sizeof(*theColor);
}
CSS_VARONSTACK_GET(Text);
if(theText && uniqueItems->AddItem(theText)){
aSize += sizeof(*theText);
}
CSS_VARONSTACK_GET(Margin);
if(theMargin && uniqueItems->AddItem(theMargin)){
aSize += sizeof(*theMargin);
}
CSS_VARONSTACK_GET(Position);
if(thePosition && uniqueItems->AddItem(thePosition)){
aSize += sizeof(*thePosition);
}
CSS_VARONSTACK_GET(List);
if(theList && uniqueItems->AddItem(theList)){
aSize += sizeof(*theList);
}
CSS_VARONSTACK_GET(Display);
if(theDisplay && uniqueItems->AddItem(theDisplay)){
aSize += sizeof(*theDisplay);
}
CSS_VARONSTACK_GET(Table);
if(theTable && uniqueItems->AddItem(theTable)){
aSize += sizeof(*theTable);
}
CSS_VARONSTACK_GET(Breaks);
if(theBreaks && uniqueItems->AddItem(theBreaks)){
aSize += sizeof(*theBreaks);
}
CSS_VARONSTACK_GET(Page);
if(thePage && uniqueItems->AddItem(thePage)){
aSize += sizeof(*thePage);
}
CSS_VARONSTACK_GET(Content);
if(theContent && uniqueItems->AddItem(theContent)){
aSize += sizeof(*theContent);
}
CSS_VARONSTACK_GET(UserInterface);
if(theUserInterface && uniqueItems->AddItem(theUserInterface)){
aSize += sizeof(*theUserInterface);
}
#ifdef INCLUDE_XUL
CSS_VARONSTACK_GET(XUL);
if(theXUL && uniqueItems->AddItem(theXUL)){
aSize += sizeof(*theXUL);
}
#endif
#ifdef MOZ_SVG
CSS_VARONSTACK_GET(SVG);
if(theSVG && uniqueItems->AddItem(theSVG)){
aSize += sizeof(*theSVG);
}
#endif
CSS_VARONSTACK_GET(Aural);
if(theAural && uniqueItems->AddItem(theAural)){
aSize += sizeof(*theAural);
}
aSizeOfHandler->AddSize(tag, aSize);
}
#endif
PRUint32

View File

@ -49,7 +49,6 @@
#include "nsVoidArray.h"
#include "nsValueArray.h"
class nsISizeOfHandler;
class nsStringArray;
struct nsCSSStruct {
@ -653,8 +652,6 @@ public:
#ifdef DEBUG
void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
protected:

View File

@ -70,7 +70,6 @@
#include "nsUnicharUtils.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
#include "nsContentUtils.h"
#include "nsContentErrors.h"
@ -309,51 +308,6 @@ PRBool nsAttrSelector::Equals(const nsAttrSelector* aOther) const
return PR_FALSE;
}
#ifdef DEBUG
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsAttrSelector's size):
* 1) sizeof(*this) + the size of mAttr atom (if it exists and is unique)
*
* Contained / Aggregated data (not reported as nsAttrSelector's size):
* none
*
* Children / siblings / parents:
* 1) Recurses to the mMext instance which is reported as a seperate instance
*
******************************************************************************/
void nsAttrSelector::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("nsAttrSelector");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// add in the mAttr atom
if (mAttr && uniqueItems->AddItem(mAttr)){
mAttr->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
aSizeOfHandler->AddSize(tag,aSize);
// recurse to the next one...
if(mNext){
mNext->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
MOZ_DECL_CTOR_COUNTER(nsCSSSelector)
#ifdef DEBUG_REFS
@ -625,113 +579,6 @@ PRInt32 nsCSSSelector::CalcWeight(void) const
return weight;
}
#ifdef DEBUG
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsCSSSelector's size):
* 1) sizeof(*this) + the size of the mTag
* + the size of the mIDList unique items
* + the size of the mClassList and mPseudoClassList unique items
*
* Contained / Aggregated data (not reported as nsCSSSelector's size):
* 1) AttributeList is called out to seperately if it exists
*
* Children / siblings / parents:
* 1) Recurses to mNext which is counted as it's own instance
*
******************************************************************************/
void nsCSSSelector::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("nsCSSSelector");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// now get the member-atoms and add them in
if(mTag && uniqueItems->AddItem(mTag)){
localSize = 0;
mTag->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
// XXX ????
// a couple of simple atom lists
if(mIDList && uniqueItems->AddItem(mIDList)){
aSize += sizeof(*mIDList);
nsAtomList *pNext = nsnull;
pNext = mIDList;
while(pNext){
if(pNext->mAtom && uniqueItems->AddItem(pNext->mAtom)){
localSize = 0;
pNext->mAtom->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
pNext = pNext->mNext;
}
}
if(mClassList && uniqueItems->AddItem(mClassList)){
aSize += sizeof(*mClassList);
nsAtomList *pNext = nsnull;
pNext = mClassList;
while(pNext){
if(pNext->mAtom && uniqueItems->AddItem(pNext->mAtom)){
localSize = 0;
pNext->mAtom->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
pNext = pNext->mNext;
}
}
if(mPseudoClassList && uniqueItems->AddItem(mPseudoClassList)){
nsAtomStringList *pNext = nsnull;
pNext = mPseudoClassList;
while(pNext){
if(pNext->mAtom && uniqueItems->AddItem(pNext->mAtom)){
localSize = 0;
pNext->mAtom->SizeOf(aSizeOfHandler, &localSize);
aSize += localSize;
}
pNext = pNext->mNext;
}
}
// done with undelegated sizes
aSizeOfHandler->AddSize(tag, aSize);
// the AttributeList gets its own delegation-call
if(mAttrList){
localSize = 0;
mAttrList->SizeOf(aSizeOfHandler, localSize);
}
// don't forget the negated selectors
if(mNegations) {
localSize = 0;
mNegations->SizeOf(aSizeOfHandler, localSize);
}
// finally chain to the next...
if(mNext){
localSize = 0;
mNext->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
// pseudo-elements are stored in the selectors' chain using fictional elements;
// these fictional elements have mTag starting with a colon
static PRBool IsPseudoElement(nsIAtom* aAtom)
@ -950,8 +797,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
protected:
@ -1040,47 +885,6 @@ CSSImportantRule::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSImportantRule's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as CSSImportantRule's size):
* 1) mDeclaration is sized seperately
* 2) mSheet is sized seperately
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSImportantRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSImportantRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(CSSImportantRule);
aSizeOfHandler->AddSize(tag,aSize);
// now dump the mDeclaration and mSheet
if(mDeclaration){
mDeclaration->SizeOf(aSizeOfHandler, localSize);
}
if(mSheet){
mSheet->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
// -- nsDOMStyleRuleDeclaration -------------------------------
@ -1429,8 +1233,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
// nsIDOMCSSRule interface
@ -2416,58 +2218,6 @@ CSSStyleRuleImpl::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSStyleRuleImpl's size):
* 1) sizeof(*this)
* + sizeof the DOMDeclaration if it exists and is unique
*
* Contained / Aggregated data (not reported as CSSStyleRuleImpl's size):
* 1) mDeclaration if it exists
* 2) mImportantRule if it exists
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSStyleRuleImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSStyleRuleImpl");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
// remove the sizeof the mSelector's class since we count it seperately below
aSize -= sizeof(mSelector);
// and add the size of the DOMDeclaration
// XXX - investigate the size and quantity of these
if(mDOMDeclaration && uniqueItems->AddItem(mDOMDeclaration)){
aSize += sizeof(DOMCSSDeclarationImpl);
}
aSizeOfHandler->AddSize(tag,aSize);
// now delegate to the Selector, Declaration, and ImportantRule
mSelector.SizeOf(aSizeOfHandler, localSize);
if(mDeclaration){
mDeclaration->SizeOf(aSizeOfHandler, localSize);
}
if(mImportantRule){
mImportantRule->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
NS_IMETHODIMP

View File

@ -97,7 +97,6 @@
#include "prlog.h"
#include "nsCOMPtr.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
#include "nsStyleUtil.h"
#include "nsQuickSort.h"
#ifdef MOZ_XUL
@ -762,10 +761,6 @@ public:
nsIAtom* aMedium,
PRBool* aResult);
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
protected:
RuleCascadeData* GetRuleCascade(nsIPresContext* aPresContext, nsIAtom* aMedium);
@ -792,10 +787,6 @@ public:
virtual void RebuildNameSpaces(void);
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
nsAutoVoidArray mSheets;
nsIURI* mURL;
@ -897,8 +888,6 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
// nsIDOMStyleSheet interface
@ -1633,81 +1622,6 @@ CSSStyleSheetInner::RebuildNameSpaces(void)
}
}
#ifdef DEBUG
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSStyleSheetInner's size):
* 1) sizeof(*this) + sizeof mSheets array (not contents though)
* + size of the mOrderedRules array (not the contents though)
*
* Contained / Aggregated data (not reported as CSSStyleSheetInner's size):
* 1) mSheets: each style sheet is sized seperately
* 2) mOrderedRules: each fule is sized seperately
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSStyleSheetInner::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this style sheet is lared accounted for
return;
}
PRUint32 localSize=0;
PRBool rulesCounted=PR_FALSE;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSStyleSheetInner");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(CSSStyleSheetInner);
// add in the size of the mSheets array itself
mSheets.SizeOf(aSizeOfHandler,&localSize);
aSize += localSize;
// and the mOrderedRules array (if there is one)
if(mOrderedRules && uniqueItems->AddItem(mOrderedRules)){
rulesCounted=PR_TRUE;
// no SizeOf method so we just get the basic object size
aSize += sizeof(*mOrderedRules);
}
aSizeOfHandler->AddSize(tag,aSize);
// delegate to the contained containers
// mSheets : nsVoidArray
{
PRUint32 sheetCount, sheetCur;
sheetCount = mSheets.Count();
for(sheetCur=0; sheetCur < sheetCount; sheetCur++){
nsICSSStyleSheet* sheet = (nsICSSStyleSheet*)mSheets.ElementAt(sheetCur);
if(sheet){
sheet->SizeOf(aSizeOfHandler, localSize);
}
}
}
// mOrderedRules : nsISupportsArray*
if(mOrderedRules && rulesCounted){
PRUint32 ruleCount, ruleCur;
mOrderedRules->Count(&ruleCount);
for(ruleCur=0; ruleCur < ruleCount; ruleCur++){
nsICSSRule* rule = (nsICSSRule*)mOrderedRules->ElementAt(ruleCur);
if(rule){
rule->SizeOf(aSizeOfHandler, localSize);
NS_IF_RELEASE(rule);
}
}
}
}
#endif
// -------------------------------
// CSS Style Sheet
@ -2554,58 +2468,6 @@ void CSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
fputs("Rules in source order:\n", out);
ListRules(mInner->mOrderedRules, out, aIndent);
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSStyleSheetImpl's size):
* 1) sizeof(*this) + sizeof the mImportsCollection + sizeof mCuleCollection)
*
* Contained / Aggregated data (not reported as CSSStyleSheetImpl's size):
* 1) mInner is delegated to be counted seperately
*
* Children / siblings / parents:
* 1) Recurse to mFirstChild
*
******************************************************************************/
void CSSStyleSheetImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this style sheet is already accounted for
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSStyleSheet");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(CSSStyleSheetImpl);
// add up the contained objects we won't delegate to:
// NOTE that we just add the sizeof the objects
// since the style data they contain is accounted for elsewhere
// - mImportsCollection
// - mRuleCollection
aSize += sizeof(mImportsCollection);
aSize += sizeof(mRuleCollection);
aSizeOfHandler->AddSize(tag,aSize);
// size the inner
if(mInner){
mInner->SizeOf(aSizeOfHandler, localSize);
}
// now travers the children (recursively, I'm sorry to say)
if(mFirstChild){
PRUint32 childSize=0;
mFirstChild->SizeOf(aSizeOfHandler, childSize);
}
}
#endif
static PRBool PR_CALLBACK
@ -4273,155 +4135,6 @@ CSSRuleProcessor::HasStateDependentStyle(StateRuleProcessorData* aData,
return NS_OK;
}
#ifdef DEBUG
struct CascadeSizeEnumData {
CascadeSizeEnumData(nsISizeOfHandler *aSizeOfHandler,
nsUniqueStyleItems *aUniqueStyleItem,
nsIAtom *aTag)
{
handler = aSizeOfHandler;
uniqueItems = aUniqueStyleItem;
tag = aTag;
}
// weak references all 'round
nsISizeOfHandler *handler;
nsUniqueStyleItems *uniqueItems;
nsIAtom *tag;
};
static
PRBool PR_CALLBACK StateSelectorsSizeEnumFunc( void *aSelector, void *aData )
{
nsCSSSelector* selector = (nsCSSSelector*)aSelector;
CascadeSizeEnumData *pData = (CascadeSizeEnumData *)aData;
NS_ASSERTION(selector && pData, "null arguments not supported");
if(! pData->uniqueItems->AddItem((void*)selector)){
return PR_TRUE;
}
// pass the call to the selector
PRUint32 localSize = 0;
selector->SizeOf(pData->handler, localSize);
return PR_TRUE;
}
static
PRBool WeightedRulesSizeEnumFunc( nsISupports *aRule, void *aData )
{
nsICSSStyleRule* rule = (nsICSSStyleRule*)aRule;
CascadeSizeEnumData *pData = (CascadeSizeEnumData *)aData;
NS_ASSERTION(rule && pData, "null arguments not supported");
if(! pData->uniqueItems->AddItem((void*)rule)){
return PR_TRUE;
}
PRUint32 localSize=0;
// pass the call to the rule
rule->SizeOf(pData->handler, localSize);
return PR_TRUE;
}
static
void CascadeSizeEnumFunc(RuleCascadeData *cascade, CascadeSizeEnumData *pData)
{
NS_ASSERTION(cascade && pData, "null arguments not supported");
// see if the cascade has already been counted
if(!(pData->uniqueItems->AddItem(cascade))){
return;
}
// record the size of the cascade data itself
PRUint32 localSize = sizeof(RuleCascadeData);
pData->handler->AddSize(pData->tag, localSize);
// next add up the selectors and the weighted rules for the cascade
nsCOMPtr<nsIAtom> stateSelectorSizeTag;
stateSelectorSizeTag = do_GetAtom("CascadeStateSelectors");
CascadeSizeEnumData stateData(pData->handler,pData->uniqueItems,stateSelectorSizeTag);
cascade->mStateSelectors.EnumerateForwards(StateSelectorsSizeEnumFunc, &stateData);
if(cascade->mWeightedRules){
nsCOMPtr<nsIAtom> weightedRulesSizeTag;
weightedRulesSizeTag = do_GetAtom("CascadeWeightedRules");
CascadeSizeEnumData stateData2(pData->handler,pData->uniqueItems,weightedRulesSizeTag);
cascade->mWeightedRules->EnumerateForwards(WeightedRulesSizeEnumFunc, &stateData2);
}
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSRuleProcessor's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as CSSRuleProcessor's size):
* 1) Delegate to the StyleSheets in the mSheets collection
* 2) Delegate to the Rules in the CascadeTable
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSRuleProcessor::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
return;
}
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("CSSRuleProcessor");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(CSSRuleProcessor);
// collect sizes for the data
// - mSheets
// - mRuleCascades
// sheets first
if(mSheets && uniqueItems->AddItem(mSheets)){
PRUint32 sheetCount, curSheet, localSize2;
mSheets->Count(&sheetCount);
for(curSheet=0; curSheet < sheetCount; curSheet++){
nsCOMPtr<nsICSSStyleSheet> pSheet =
dont_AddRef((nsICSSStyleSheet*)mSheets->ElementAt(curSheet));
if(pSheet && uniqueItems->AddItem((void*)pSheet)){
pSheet->SizeOf(aSizeOfHandler, localSize2);
// XXX aSize += localSize2;
}
}
}
// and for the medium cascade table we account for the hash table overhead,
// and then compute the sizeof each rule-cascade in the table
{
nsCOMPtr<nsIAtom> tag2 = do_GetAtom("RuleCascade");
CascadeSizeEnumData data(aSizeOfHandler, uniqueItems, tag2);
for (RuleCascadeData *cascadeData = mRuleCascades;
cascadeData;
cascadeData = cascadeData->mNext) {
CascadeSizeEnumFunc(cascadeData, &data);
}
}
// now add the size of the RuleProcessor
aSizeOfHandler->AddSize(tag,aSize);
}
#endif
NS_IMETHODIMP
CSSRuleProcessor::ClearRuleCascades(void)
{

View File

@ -51,7 +51,6 @@
#include "nsHTMLAtoms.h"
#include "nsIHTMLContent.h"
#include "nsVoidArray.h"
#include "nsISizeOfHandler.h"
#include "nsCOMPtr.h"
#include "nsUnicharUtils.h"
@ -291,16 +290,6 @@ struct HTMLAttribute {
return PR_FALSE;
}
#ifdef DEBUG
nsresult SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const {
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = sizeof(*this);
return NS_OK;
}
#endif
nsHTMLAttrName mAttribute;
nsHTMLValue mValue;
HTMLAttribute* mNext;
@ -358,8 +347,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
void SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult);
#endif
nsIHTMLStyleSheet* mSheet;
@ -793,33 +780,6 @@ nsHTMLMappedAttributes::List(FILE* out, PRInt32 aIndent) const
}
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as nsHTMLMappedAttributes's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as nsHTMLMappedAttributes's size):
* none
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void nsHTMLMappedAttributes::SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult)
{
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this is already accounted for
return;
}
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("HTMLMappedAttributes");
aResult = sizeof(*this);
aSizer->AddSize(tag, aResult);
}
#endif
//--------------------
@ -1583,48 +1543,6 @@ nsHTMLAttributes::List(FILE* out, PRInt32 aIndent) const
}
return NS_OK;
}
void nsHTMLAttributes::SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult)
{
PRUint32 sum = 0;
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this is already accounted for
return;
}
// XXX step through this again
sum = sizeof(*this);
if (mAttrNames != mNameBuffer) {
sum += sizeof(*mAttrNames) * mAttrSize;
}
if (mFirstUnmapped) {
HTMLAttribute* ha = mFirstUnmapped;
while (ha) {
PRUint32 asum = 0;
ha->SizeOf(aSizer, &asum); // XXX Unique???
sum += asum;
ha = ha->mNext;
}
}
if (mMapped) {
PRBool recorded;
aSizer->RecordObject((void*)mMapped, &recorded);
if (!recorded) {
PRUint32 asum = 0;
mMapped->SizeOf(aSizer, asum); // XXX Unique???
sum += asum;
}
}
aResult = sum;
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("nsHTMLAttributes");
aSizer->AddSize(tag, aResult);
}
#endif
nsresult

View File

@ -70,10 +70,6 @@ public:
NS_IMETHOD SetUniqued(PRBool aUniqued) = 0;
NS_IMETHOD GetUniqued(PRBool& aUniqued) = 0;
NS_IMETHOD DropStyleSheetReference(void) = 0;
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult) = 0;
#endif
};
@ -248,8 +244,6 @@ public:
#ifdef DEBUG
NS_METHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
void SizeOf(nsISizeOfHandler* aSizer, PRUint32 &aResult);
#endif
protected:

View File

@ -56,9 +56,6 @@
#include "nsIStyleSet.h"
#include "nsRuleWalker.h"
#include "nsISizeOfHandler.h"
class CSSFirstLineRule : public nsIStyleRule {
public:
CSSFirstLineRule(nsIHTMLCSSStyleSheet* aSheet);
@ -73,8 +70,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
nsIHTMLCSSStyleSheet* mSheet;
@ -127,44 +122,6 @@ CSSFirstLineRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as CSSFirstLineRule's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as CSSFirstLineRule's size):
* 1) Delegate to mSheet if it exists
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void CSSFirstLineRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
// object has already been accounted for
return;
}
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("CSSFirstLine-LetterRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
aSizeOfHandler->AddSize(tag,aSize);
if(mSheet){
PRUint32 localSize=0;
mSheet->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
// -----------------------------------------------------------
@ -228,8 +185,6 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
// If changing the given attribute cannot affect style context, aAffects
@ -490,57 +445,6 @@ void HTMLCSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
}
fputs("\n", out);
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as HTMLCSSStyleSheetImpl's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as HTMLCSSStyleSheetImpl's size):
* 1) We don't really delegate but count seperately the FirstLineRule and
* the FirstLetterRule if the exist and are unique instances
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void HTMLCSSStyleSheetImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this style sheet is lared accounted for
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag;
tag = do_GetAtom("HTMLCSSStyleSheet");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(HTMLCSSStyleSheetImpl);
aSizeOfHandler->AddSize(tag,aSize);
// Now the associated rules (if they exist)
// - mFirstLineRule
// - mFirstLetterRule
if(mFirstLineRule && uniqueItems->AddItem((void*)mFirstLineRule)){
localSize = sizeof(*mFirstLineRule);
aSize += localSize;
tag = do_GetAtom("FirstLineRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(mFirstLetterRule && uniqueItems->AddItem((void*)mFirstLetterRule)){
localSize = sizeof(*mFirstLetterRule);
aSize += localSize;
tag = do_GetAtom("FirstLetterRule");
aSizeOfHandler->AddSize(tag,localSize);
}
}
#endif
NS_IMETHODIMP

View File

@ -61,7 +61,6 @@
#include "nsRuleWalker.h"
#include "nsIStyleSet.h"
#include "nsISizeOfHandler.h"
static NS_DEFINE_CID(kCSSFrameConstructorCID, NS_CSSFRAMECONSTRUCTOR_CID);
@ -79,8 +78,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
nscolor mColor;
@ -94,10 +91,6 @@ public:
NS_IMETHOD MapRuleInfoInto(nsRuleData* aRuleData);
#ifdef DEBUG
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
void Reset() {
mInitialized = PR_FALSE;
}
@ -143,43 +136,6 @@ HTMLColorRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as HTMLColorRule's size):
* 1) sizeof(*this) +
*
* Contained / Aggregated data (not reported as HTMLColorRule's size):
* 1) delegate to the mSheet
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void HTMLColorRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
// object has already been accounted for
return;
}
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("HTMLColorRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
aSizeOfHandler->AddSize(tag,aSize);
if(mSheet){
PRUint32 localSize=0;
mSheet->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
HTMLDocumentColorRule::HTMLDocumentColorRule(nsIHTMLStyleSheet* aSheet)
@ -230,45 +186,6 @@ HTMLDocumentColorRule::Initialize(nsIPresContext* aPresContext)
mColor = bodyColor->mColor;
}
#ifdef DEBUG
/******************************************************************************
* SizeOf method:
*
* Self (reported as HTMLDocumentColorRule's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as HTMLDocumentColorRule's size):
* 1) Delegate to the mSheet
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void HTMLDocumentColorRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
// object has already been accounted for
return;
}
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("HTMLDocumentColorRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
aSizeOfHandler->AddSize(tag,aSize);
if(mSheet){
PRUint32 localSize;
mSheet->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
class GenericTableRule: public nsIStyleRule {
public:
GenericTableRule(nsIHTMLStyleSheet* aSheet);
@ -283,8 +200,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
void Reset()
@ -325,43 +240,6 @@ GenericTableRule::List(FILE* out, PRInt32 aIndent) const
{
return NS_OK;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as GenericTableRule's size):
* 1) sizeof(*this) +
*
* Contained / Aggregated data (not reported as GenericTableRule's size):
* 1) Delegate to the mSheet if it exists
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void GenericTableRule::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this) ){
// object has already been accounted for
return;
}
// get or create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("GenericTableRule");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(*this);
aSizeOfHandler->AddSize(tag,aSize);
if(mSheet){
PRUint32 localSize;
mSheet->SizeOf(aSizeOfHandler, localSize);
}
}
#endif
// -----------------------------------------------------------
@ -785,8 +663,6 @@ public:
#ifdef DEBUG
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;
virtual void SizeOf(nsISizeOfHandler *aSizeofHandler, PRUint32 &aSize);
#endif
// If changing the given attribute cannot affect style context, aAffects
@ -813,8 +689,6 @@ protected:
TableColgroupRule* mTableColgroupRule;
TableColRule* mTableColRule;
TableTHRule* mTableTHRule;
// NOTE: if adding more rules, be sure to update
// the SizeOf method to include them
PLDHashTable mMappedAttrTable;
};
@ -1347,164 +1221,6 @@ void HTMLStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
}
fputs("\n", out);
}
struct MappedAttributeSizeEnumData
{
MappedAttributeSizeEnumData(nsISizeOfHandler *aSizeOfHandler,
nsUniqueStyleItems *aUniqueStyleItem)
{
aHandler = aSizeOfHandler;
uniqueItems = aUniqueStyleItem;
}
// weak references all 'round
nsISizeOfHandler *aHandler;
nsUniqueStyleItems *uniqueItems;
};
PR_STATIC_CALLBACK(PLDHashOperator)
MappedSizeAttributes(PLDHashTable *table, PLDHashEntryHdr *hdr,
PRUint32 number, void *arg)
{
MappedAttributeSizeEnumData *pData = (MappedAttributeSizeEnumData *)arg;
NS_ASSERTION(pData,"null closure is not supported");
MappedAttrTableEntry *entry = NS_STATIC_CAST(MappedAttrTableEntry*, hdr);
nsIHTMLMappedAttributes* mapped = entry->mAttributes;
NS_ASSERTION(mapped, "null item in enumeration fcn is not supported");
// if there is an attribute and it has not been counted, the get its size
if(mapped){
PRUint32 size=0;
mapped->SizeOf(pData->aHandler, size);
}
return PL_DHASH_NEXT;
}
/******************************************************************************
* SizeOf method:
*
* Self (reported as HTMLStyleSheetImpl's size):
* 1) sizeof(*this)
*
* Contained / Aggregated data (not reported as HTMLStyleSheetImpl's size):
* 1) Not really delegated, but counted seperately:
* - mLinkRule
* - mVisitedRule
* - mActiveRule
* - mDocumentColorRule
* - mTableTbodyRule
* - mTableRowRule
* - mTableColgroupRule
* - mTableColRule
* - mTableTHRule
* - mMappedAttrTable
* 2) Delegates (really) to the MappedAttributes in the mMappedAttrTable
*
* Children / siblings / parents:
* none
*
******************************************************************************/
void
HTMLStyleSheetImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");
// first get the unique items collection
UNIQUE_STYLE_ITEMS(uniqueItems);
if(! uniqueItems->AddItem((void*)this)){
// this style sheet is lared accounted for
return;
}
PRUint32 localSize=0;
// create a tag for this instance
nsCOMPtr<nsIAtom> tag = do_GetAtom("HTMLStyleSheet");
// get the size of an empty instance and add to the sizeof handler
aSize = sizeof(HTMLStyleSheetImpl);
aSizeOfHandler->AddSize(tag,aSize);
// now gather up the sizes of the data members
// - mLinkRule : sizeof object
// - mVisitedRule : sizeof object
// - mActiveRule : sizeof object
// - mDocumentColorRule : sizeof object
// - mTableTbodyRule : sizeof object
// - mTableRowRule : sizeof object
// - mTableColgroupRule : sizeof object
// - mTableColRule : sizeof object
// - mTableTHRule : sizeof object
// - mMappedAttrTable
if(mLinkRule && uniqueItems->AddItem((void*)mLinkRule)){
localSize = sizeof(*mLinkRule);
tag = do_GetAtom("LinkRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(mVisitedRule && uniqueItems->AddItem((void*)mVisitedRule)){
localSize = sizeof(*mVisitedRule);
tag = do_GetAtom("VisitedRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(mActiveRule && uniqueItems->AddItem((void*)mActiveRule)){
localSize = sizeof(*mActiveRule);
tag = do_GetAtom("ActiveRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mDocumentColorRule)){
localSize = sizeof(*mDocumentColorRule);
tag = do_GetAtom("DocumentColorRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mTableTbodyRule)){
localSize = sizeof(*mTableTbodyRule);
tag = do_GetAtom("TableTbodyRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mTableRowRule)){
localSize = sizeof(*mTableRowRule);
tag = do_GetAtom("TableRowRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mTableColgroupRule)){
localSize = sizeof(*mTableColgroupRule);
tag = do_GetAtom("TableColgroupRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mTableColRule)){
localSize = sizeof(*mTableColRule);
tag = do_GetAtom("TableColRule");
aSizeOfHandler->AddSize(tag,localSize);
}
if(uniqueItems->AddItem((void*)mTableTHRule)){
localSize = sizeof(*mTableTHRule);
tag = do_GetAtom("TableTHRule");
aSizeOfHandler->AddSize(tag,localSize);
}
// for the AttrTable it is kindof sleezy:
// We want the hash table overhead as well as the entries it contains
//
// we get the overall size of the hashtable, and if there are entries,
// we calculate a rough overhead estimate as:
// number of entries X sizeof each hash-entry
// + the size of a hash table (see plhash.h and nsHashTable.h)
// then we add up the size of each unique attribute
if (mMappedAttrTable.ops) {
localSize =
PL_DHASH_TABLE_SIZE(&mMappedAttrTable) * mMappedAttrTable.entrySize;
tag = do_GetAtom("MappedAttrTable");
aSizeOfHandler->AddSize(tag,localSize);
// now get each unique attribute
MappedAttributeSizeEnumData sizeEnumData(aSizeOfHandler, uniqueItems);
PL_DHashTableEnumerate(&mMappedAttrTable, &MappedSizeAttributes,
&sizeEnumData);
}
// that's it
}
#endif
NS_IMETHODIMP

View File

@ -47,8 +47,6 @@
#include "nsCSSValue.h"
#include "nsIAtom.h"
class nsISizeOfHandler;
class nsIAtom;
class nsIArena;
class nsCSSDeclaration;
@ -96,10 +94,6 @@ public:
~nsAttrSelector(void);
PRBool Equals(const nsAttrSelector* aOther) const;
#ifdef DEBUG
void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
PRInt32 mNameSpace;
nsIAtom* mAttr;
PRUint8 mFunction;
@ -136,9 +130,6 @@ public:
PRInt32 CalcWeight(void) const;
#ifdef DEBUG
void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
nsresult ToString( nsAString& aString, nsICSSStyleSheet* aSheet,
PRBool aIsPseudoElem, PRInt8 aNegatedIndex ) const;

View File

@ -108,8 +108,6 @@ public:
void DumpRegressionData(nsIPresContext* aPresContext, FILE* out, PRInt32 aIndent);
void List(FILE* out, PRInt32 aIndent);
void SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize);
#endif
protected:

View File

@ -414,14 +414,6 @@ nsSVGElement::DumpContent(FILE* out, PRInt32 aIndent,PRBool aDumpAll) const
return NS_OK;
}
NS_IMETHODIMP
nsSVGElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
// NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_UNEXPECTED;
}
//----------------------------------------------------------------------
// nsIStyledContent methods

View File

@ -132,8 +132,6 @@ public:
// NS_IMETHOD GetBindingParent(nsIContent** aContent);
// NS_IMETHOD SetBindingParent(nsIContent* aParent);
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
// nsIXMLContent
// NS_IMETHOD MaybeTriggerAutoLink(nsIWebShell *aShell);

View File

@ -794,17 +794,3 @@ nsXMLElement::GetID(nsIAtom*& aResult) const
return rv;
}
#ifdef DEBUG
NS_IMETHODIMP
nsXMLElement::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
*aResult = sizeof(*this);
return NS_OK;
}
#endif

View File

@ -86,9 +86,6 @@ public:
nsIDOMEvent** aDOMEvent,
PRUint32 aFlags,
nsEventStatus* aEventStatus);
#ifdef DEBUG
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
PRBool mIsLink;

View File

@ -66,7 +66,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:
@ -220,22 +219,4 @@ nsXMLEntity::DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const
{
return NS_OK;
}
NS_IMETHODIMP
nsXMLEntity::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) return NS_ERROR_NULL_POINTER;
PRUint32 sum;
nsGenericDOMDataNode::SizeOf(aSizer, &sum);
PRUint32 ssize;
mName.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mName) + ssize;
mPublicId.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mPublicId) + ssize;
mSystemId.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mSystemId) + ssize;
mNotationName.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mNotationName) + ssize;
return NS_OK;
}
#endif

View File

@ -67,7 +67,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
// nsIContent
@ -204,21 +203,4 @@ nsXMLNotation::DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const
{
return NS_OK;
}
NS_IMETHODIMP
nsXMLNotation::SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const
{
if (!aResult) return NS_ERROR_NULL_POINTER;
PRUint32 sum;
nsGenericDOMDataNode::SizeOf(aSizer, &sum);
PRUint32 ssize;
mName.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mName) + ssize;
mPublicId.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mPublicId) + ssize;
mSystemId.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mSystemId) + ssize;
return NS_OK;
}
#endif

View File

@ -175,17 +175,4 @@ nsXMLProcessingInstruction::DumpContent(FILE* out, PRInt32 aIndent,
PRBool aDumpAll) const {
return NS_OK;
}
NS_IMETHODIMP
nsXMLProcessingInstruction::SizeOf(nsISizeOfHandler* aSizer,
PRUint32* aResult) const
{
if (!aResult) return NS_ERROR_NULL_POINTER;
PRUint32 sum;
nsGenericDOMDataNode::SizeOf(aSizer, &sum);
PRUint32 ssize;
mTarget.SizeOf(aSizer, &ssize);
sum = sum - sizeof(mTarget) + ssize;
return NS_OK;
}
#endif

View File

@ -69,7 +69,6 @@ public:
#ifdef DEBUG
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
NS_IMETHOD DumpContent(FILE* out, PRInt32 aIndent, PRBool aDumpAll) const;
NS_IMETHOD SizeOf(nsISizeOfHandler* aSizer, PRUint32* aResult) const;
#endif
protected:

View File

@ -145,7 +145,6 @@
// The XUL doc interface
#include "nsIDOMXULDocument.h"
#include "nsISizeOfHandler.h"
#include "nsReadableUtils.h"
#include "nsITimelineService.h"
#include "nsIFrame.h"
@ -3149,19 +3148,6 @@ nsXULElement::List(FILE* out, PRInt32 aIndent) const
return NS_OK;
}
NS_IMETHODIMP
nsXULElement::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
{
if (!aResult) {
return NS_ERROR_NULL_POINTER;
}
PRUint32 sum = 0;
sum += (PRUint32) sizeof(*this);
*aResult = sum;
return NS_OK;
}
#endif
NS_IMETHODIMP
@ -4442,16 +4428,6 @@ nsXULElement::IsContentOfType(PRUint32 aFlags)
return !(aFlags & ~(eELEMENT | eXUL));
}
#ifdef DEBUG
void nsXULElement::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize)
{
// XXX - implement this if you want the sizes of XUL style rules
// dumped during StyleSize dump
return;
}
#endif
nsresult
nsXULElement::AddPopupListener(nsIAtom* aName)
{

Some files were not shown because too many files have changed in this diff Show More