printf( " - StyleContentImpl:       %ld\n", (long)sizeof(GETSCDATA(Content)) );
PRINTF( " - StyleContentImpl:       %ld\n", (long)sizeof(GETSCDATA(Content)) );
void StyleContextImpl::SizeOf(nsISizeOfHandler *aSizeOfHandler, PRUint32 &aSize){  NS_ASSERTION(aSizeOfHandler != nsnull, "SizeOf handler cannot be null");  static PRBool bDetailDumpDone = PR_FALSE;  if (!bDetailDumpDone) {    bDetailDumpDone = PR_TRUE;    PRUint32 totalSize=0;    printf( "Detailed StyleContextImpl dump: basic class sizes of members\n" );    printf( "*************************************\n");    printf( " - StyleFontImpl:          %ld\n", (long)sizeof(GETSCDATA(Font)) );    totalSize += (long)sizeof(GETSCDATA(Font));    printf( " - StyleColorImpl:         %ld\n", (long)sizeof(GETSCDATA(Color)) );    totalSize += (long)sizeof(GETSCDATA(Color));    printf( " - StyleSpacingImpl:       %ld\n", (long)sizeof(GETSCDATA(Spacing)) );    totalSize += (long)sizeof(GETSCDATA(Spacing));    printf( " - StyleListImpl:          %ld\n", (long)sizeof(GETSCDATA(List)) );    totalSize += (long)sizeof(GETSCDATA(List));    printf( " - StylePositionImpl:      %ld\n", (long)sizeof(GETSCDATA(Position)) );    totalSize += (long)sizeof(GETSCDATA(Position));    printf( " - StyleTextImpl:          %ld\n", (long)sizeof(GETSCDATA(Text)) );    totalSize += (long)sizeof(GETSCDATA(Text));    printf( " - StyleDisplayImpl:       %ld\n", (long)sizeof(GETSCDATA(Display)) );    totalSize += (long)sizeof(GETSCDATA(Display));    printf( " - StyleTableImpl:         %ld\n", (long)sizeof(GETSCDATA(Table)) );    totalSize += (long)sizeof(GETSCDATA(Table));    printf( " - StyleContentImpl:       %ld\n", (long)sizeof(GETSCDATA(Content)) );    totalSize += (long)sizeof(GETSCDATA(Content));    printf( " - StyleUserInterfaceImpl: %ld\n", (long)sizeof(GETSCDATA(UserInterface)) );    totalSize += (long)sizeof(GETSCDATA(UserInterface));	  printf( " - StylePrintImpl:         %ld\n", (long)sizeof(GETSCDATA(Print)));    totalSize += (long)sizeof(GETSCDATA(Print));    printf( " - Total:                  %ld\n", (long)totalSize);    printf( "*************************************\n");  }  // 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 = getter_AddRefs(NS_NewAtom("StyleContextImpl"));  // 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);#ifdef SHARE_STYLECONTEXTS  // count the style data seperately  if (mStyleData) {    mStyleData->SizeOf(aSizeOfHandler,localSize);  }#endif  // size up the rules (if not already done)  // XXX - overhead of the collection???  if(mRules && uniqueItems->AddItem(mRules)){    PRUint32 curRule, ruleCount;    mRules->Count(&ruleCount);    if (ruleCount > 0) {      for (curRule = 0; curRule < ruleCount; curRule++) {        nsIStyleRule* rule = (nsIStyleRule*)mRules->ElementAt(curRule);        NS_ASSERTION(rule, "null entry in Rules list is bad news");        rule->SizeOf(aSizeOfHandler, localSize);        NS_RELEASE(rule);      }    }  }    // now follow up with the child (and empty child) recursion  if (nsnull != mChild) {    StyleContextImpl* child = mChild;    do {      child->SizeOf(aSizeOfHandler, localSize);      child = child->mNextSibling;    } while (mChild != child);  }  if (nsnull != mEmptyChild) {    StyleContextImpl* 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);  }}