nsresult result = NS_OK; if (! mSheets) { result = NS_NewISupportsArray(&mSheets);
NS_PRECONDITION(nsnull != aSheet, "null arg");  if (NS_SUCCEEDED(WillDirty())) { NS_ADDREF(aSheet); CSSStyleSheetImpl* sheet = (CSSStyleSheetImpl*)aSheet;  if (! mFirstChild) { mFirstChild = sheet; } else { CSSStyleSheetImpl* child = mFirstChild; while (child->mNext) { child = child->mNext; } child->mNext = sheet; }    sheet->mParent = this; DidDirty();
CSSRuleProcessor::AppendStyleSheet(nsICSSStyleSheet* aStyleSheet){  nsresult result = NS_OK;  if (! mSheets) {    result = NS_NewISupportsArray(&mSheets);  }  if (mSheets) {    mSheets->AppendElement(aStyleSheet);  }  return result;}