return clone;
nsCOMPtr<nsICSSStyleRule> oldRule = mRule; mRule = oldRule->DeclarationChanged(PR_TRUE).get(); if (!mRule) return NS_ERROR_OUT_OF_MEMORY; nsrefcnt cnt = mRule->Release(); if (cnt == 0) { NS_NOTREACHED("container didn't take ownership"); mRule = nsnull; return NS_ERROR_UNEXPECTED; }  if (owningDoc) { owningDoc->StyleRuleChanged(sheet, oldRule, mRule); owningDoc->EndUpdate(); } return NS_OK;
CSSStyleRuleImpl::DeclarationChanged(PRBool aHandleContainer){  CSSStyleRuleImpl* clone = new CSSStyleRuleImpl(*this, mDeclaration);  if (!clone) {    return nsnull;  }  NS_ADDREF(clone); // for return  if (aHandleContainer && mSheet) {    if (mParentRule) {      mSheet->ReplaceRuleInGroup(mParentRule, this, clone);    } else {      mSheet->ReplaceStyleRule(this, clone);    }  }  return clone;}