mDocumentColorRule = new HTMLDocumentColorRule(this); if (!mDocumentColorRule) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(mDocumentColorRule);
HTMLStyleSheetImpl::Reset(nsIURI* aURL){  NS_IF_RELEASE(mURL);  mURL = aURL;  NS_ADDREF(mURL);  if (mLinkRule) {    mLinkRule->mSheet = nsnull;    NS_RELEASE(mLinkRule);  }  if (mVisitedRule) {    mVisitedRule->mSheet = nsnull;    NS_RELEASE(mVisitedRule);  }  if (mActiveRule) {    mActiveRule->mSheet = nsnull;    NS_RELEASE(mActiveRule);  }  if (mDocumentColorRule) {    mDocumentColorRule->mSheet = nsnull;    NS_RELEASE(mDocumentColorRule);  }  if (mMappedAttrTable.ops) {    PL_DHashTableFinish(&mMappedAttrTable);    mMappedAttrTable.ops = nsnull;  }  mDocumentColorRule = new HTMLDocumentColorRule(this);  if (!mDocumentColorRule)    return NS_ERROR_OUT_OF_MEMORY;  NS_ADDREF(mDocumentColorRule);  return NS_OK;}