++gInstanceCount; fprintf(stdout, "%d + StyleContext\n", gInstanceCount);
mInstance = ++gInstanceCount; fprintf(stdout, "%d of %d + StyleContext\n", mInstance, gInstanceCount);
StyleContextImpl::StyleContextImpl(nsIStyleContext* aParent,                                   nsISupportsArray* aRules,                                    nsIPresContext* aPresContext)  : mParent(aParent), // weak ref    mRules(aRules),    mFont(aPresContext->GetDefaultFont()),    mColor(),    mSpacing(),    mList(),    mPosition(),    mText(),    mDisplay(),    mTable(nsnull){  NS_INIT_REFCNT();  NS_IF_ADDREF(mRules);  if (nsnull != aParent) {    InheritFrom((StyleContextImpl&)*aParent);  }  if (nsnull != mRules) {    PRInt32 index = mRules->Count();    while (0 < index) {      nsIStyleRule* rule = (nsIStyleRule*)mRules->ElementAt(--index);      rule->MapStyleInto(this, aPresContext);      NS_RELEASE(rule);    }  }#ifdef DEBUG_REFS  ++gInstanceCount;  fprintf(stdout, "%d + StyleContext\n", gInstanceCount);#endif}