styleSet->ListContexts(out);
nsIFrame* root = mPresShell->GetRootFrame(); if (nsnull == root) { fputs("null root frame\n", out); } else { nsIStyleContext* rootContext; root->GetStyleContext(mPresContext, rootContext); if (nsnull != rootContext) { styleSet->ListContexts(rootContext, out); NS_RELEASE(rootContext); } else { fputs("null root context", out); } }
void WebWidgetImpl::DumpStyleContexts(FILE* out){  if (nsnull == out) {    out = stdout;  }  if (nsnull != mPresShell) {    nsIStyleSet* styleSet = mPresShell->GetStyleSet();    if (nsnull == styleSet) {      fputs("null style set\n", out);    } else {      styleSet->ListContexts(out);      NS_RELEASE(styleSet);    }  } else {    fputs("null pres shell\n", out);  }}