CLEAR_ERROR();
PRBool CSSParserImpl::ParseRuleSet(PRInt32& aErrorCode){  // First get the list of selectors for the rule  SelectorList* slist = nsnull;  PRUint32 linenum = mScanner->GetLineNumber();  if (! ParseSelectorList(aErrorCode, slist)) {    REPORT_UNEXPECTED1(NS_LITERAL_STRING("Ruleset ignored due to bad selector"));    SkipRuleSet(aErrorCode);    return PR_FALSE;  }  NS_ASSERTION(nsnull != slist, "null selector list");  // Next parse the declaration block  nsICSSDeclaration* declaration = ParseDeclarationBlock(aErrorCode, PR_TRUE);  if (nsnull == declaration) {    // XXX skip something here    delete slist;    return PR_FALSE;  }#if 0  slist->Dump();  fputs("{\n", stdout);  declaration->List();  fputs("}\n", stdout);#endif  // Translate the selector list and declaration block into style data  SelectorList* list = slist;  while (nsnull != list) {    nsICSSStyleRule* rule = nsnull;    NS_NewCSSStyleRule(&rule, *(list->mSelectors));    if (nsnull != rule) {      if (nsnull != list->mSelectors->mNext) { // hand off other selectors to new rule        nsCSSSelector* ruleFirst = rule->FirstSelector();        ruleFirst->mNext = list->mSelectors->mNext;        list->mSelectors->mNext = nsnull;      }      rule->SetLineNumber(linenum);      rule->SetDeclaration(declaration);      rule->SetWeight(list->mWeight);      rule->SetSourceSelectorText(list->mSourceString); // capture the original input (need this for namespace prefixes)//      rule->List();      AppendRule(rule);      NS_RELEASE(rule);    }    list = list->mNext;  }  // Release temporary storage  delete slist;  NS_RELEASE(declaration);  return PR_TRUE;}