NS_PRECONDITION(mDoc, "Missing Editor DOM Document");         nsCOMPtr<nsIDOMElement> bodyElement; nsresult res = nsEditor::GetBodyElement(getter_AddRefs(bodyElement)); if (!bodyElement) res = NS_ERROR_NULL_POINTER; if (NS_SUCCEEDED(res)) { nsAutoEditBatch beginBatching(this);  bodyElement->SetAttribute("bgcolor", aColor);
nsresult res; PRBool useCSS; GetIsCSSEnabled(&useCSS); if (useCSS) {    res = SetCSSBackgroundColor(aColor);
NS_IMETHODIMP nsHTMLEditor::SetBackgroundColor(const nsString& aColor){//  nsresult result;  NS_PRECONDITION(mDoc, "Missing Editor DOM Document");    // TODO: Check selection for Cell, Row, Column or table and do color on appropriate level  // For initial testing, just set the background on the BODY tag (the document's background)  // TODO: Check selection for Cell, Row, Column or table and do color on appropriate level  // For initial testing, just set the background on the BODY tag (the document's background)  // Set the background color attribute on the body tag  nsCOMPtr<nsIDOMElement> bodyElement;  nsresult res = nsEditor::GetBodyElement(getter_AddRefs(bodyElement));  if (!bodyElement) res = NS_ERROR_NULL_POINTER;  if (NS_SUCCEEDED(res))  {    nsAutoEditBatch beginBatching(this);		// XXX: ERROR_HANDLING  should this be "res = SetAttribute..."    bodyElement->SetAttribute("bgcolor", aColor);  }    return res;}