NS_IF_RELEASE(lastContent);
NS_IF_RELEASE(content);
static void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData){  ContentEnumData* data = (ContentEnumData*)aData;  nsCSSSelector* selector = aRule->FirstSelector();  if (SelectorMatches(data->mPresContext, selector, data->mContent)) {    selector = selector->mNext;    nsIContent* content = nsnull;    nsIContent* lastContent = nsnull;    data->mContent->GetParent(content);    while ((nsnull != selector) && (nsnull != content)) { // check compound selectors      if (SelectorMatches(data->mPresContext, selector, content)) {        selector = selector->mNext;      }      lastContent = content;      content->GetParent(content);      NS_IF_RELEASE(lastContent);    }    NS_IF_RELEASE(lastContent);    if (nsnull == selector) { // ran out, it matched      nsIStyleRule* iRule;      if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) {        data->mResults->AppendElement(iRule);        data->mCount++;        NS_RELEASE(iRule);        iRule = aRule->GetImportantRule();        if (nsnull != iRule) {          data->mResults->AppendElement(iRule);          data->mCount++;          NS_RELEASE(iRule);        }      }    }  }}