InsertRuleByWeight(nsISupports* aRule, void* aData)
InsertRuleByWeight(nsICSSRule* aRule, void* aData)
InsertRuleByWeight(nsISupports* aRule, void* aData){  nsICSSRule* rule = (nsICSSRule*)aRule;  CascadeEnumData* data = (CascadeEnumData*)aData;  PRInt32 type = nsICSSRule::UNKNOWN_RULE;  rule->GetType(type);  if (nsICSSRule::STYLE_RULE == type) {    nsICSSStyleRule* styleRule = (nsICSSStyleRule*)rule;    for (nsCSSSelectorList *sel = styleRule->Selector();         sel; sel = sel->mNext) {      PRInt32 weight = sel->mWeight;      nsPRUint32Key key(weight);      nsAutoVoidArray *rules =        NS_STATIC_CAST(nsAutoVoidArray*, data->mRuleArrays.Get(&key));      if (!rules) {        rules = new nsAutoVoidArray();        if (!rules) return PR_FALSE; // out of memory        data->mRuleArrays.Put(&key, rules);      }      RuleValue *info =        new (data->mArena) RuleValue(styleRule, sel->mSelectors);      rules->AppendElement(info);    }  }  else if (nsICSSRule::MEDIA_RULE == type ||           nsICSSRule::DOCUMENT_RULE == type) {    nsICSSGroupRule* groupRule = (nsICSSGroupRule*)rule;    if (groupRule->UseForPresentation(data->mPresContext))      groupRule->EnumerateRulesForwards(InsertRuleByWeight, aData);  }  return PR_TRUE;}