nsCOMPtr<nsIStyleSheet> sheet; mDocument->GetStyleSheetAt(index, PR_FALSE, getter_AddRefs(sheet));
nsIStyleSheet *sheet = mDocument->GetStyleSheetAt(index, PR_FALSE);
PresShell::SelectAlternateStyleSheet(const nsString& aSheetTitle){  if (mDocument && mStyleSet) {    PRInt32 count = 0;    mDocument->GetNumberOfStyleSheets(PR_FALSE, &count);    PRInt32 index;    NS_NAMED_LITERAL_STRING(textHtml,"text/html");    for (index = 0; index < count; index++) {      nsCOMPtr<nsIStyleSheet> sheet;      mDocument->GetStyleSheetAt(index, PR_FALSE, getter_AddRefs(sheet));      PRBool complete;      sheet->GetComplete(complete);      if (complete) {        nsAutoString type;        sheet->GetType(type);        if (!type.Equals(textHtml)) {          nsAutoString title;          sheet->GetTitle(title);          if (!title.IsEmpty()) {            if (title.Equals(aSheetTitle)) {              mStyleSet->AddDocStyleSheet(sheet, mDocument);            }            else {              mStyleSet->RemoveDocStyleSheet(sheet);            }          }        }      }    }        return ReconstructStyleData();  }  return NS_OK;}