if (mURL || mDocument) return NS_ERROR_ALREADY_INITIALIZED;
mDocumentColorRule = new HTMLDocumentColorRule(this); if (!mDocumentColorRule) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(mDocumentColorRule);
HTMLStyleSheetImpl::Init(nsIURI* aURL, nsIDocument* aDocument){  NS_PRECONDITION(aURL && aDocument, "null ptr");  if (! aURL || ! aDocument)    return NS_ERROR_NULL_POINTER;  if (mURL || mDocument)    return NS_ERROR_ALREADY_INITIALIZED;  mDocument = aDocument; // not refcounted!  mURL = aURL;  NS_ADDREF(mURL);  return NS_OK;}