nsString* str = new nsAutoString(aPropValue); if (!str) { return NS_ERROR_OUT_OF_MEMORY;
case eCSSProperty_background_x_position: case eCSSProperty_background_y_position: case eCSSProperty_margin_end_value: case eCSSProperty_margin_left_value: case eCSSProperty_margin_right_value: case eCSSProperty_margin_start_value: case eCSSProperty_margin_left_ltr_source: case eCSSProperty_margin_left_rtl_source: case eCSSProperty_margin_right_ltr_source: case eCSSProperty_margin_right_rtl_source: case eCSSProperty_padding_end_value: case eCSSProperty_padding_left_value: case eCSSProperty_padding_right_value: case eCSSProperty_padding_start_value: case eCSSProperty_padding_left_ltr_source: case eCSSProperty_padding_left_rtl_source: case eCSSProperty_padding_right_ltr_source: case eCSSProperty_padding_right_rtl_source:  REPORT_UNEXPECTED(PEInaccessibleProperty); return PR_FALSE;  default: { nsCSSValue value; if (ParseSingleValueProperty(aErrorCode, value, aPropID)) { if (ExpectEndProperty(aErrorCode, PR_TRUE)) { AppendValue(aPropID, value); aErrorCode = NS_OK; return PR_TRUE; }  }  }
CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,                             const nsAString& aPropValue,                             nsIURI* aSheetURL,                             nsIURI* aBaseURL,                             nsCSSDeclaration* aDeclaration,                             PRBool* aChanged){  NS_ASSERTION(nsnull != aBaseURL, "need base URL");  NS_ASSERTION(nsnull != aDeclaration, "Need declaration to parse into!");  *aChanged = PR_FALSE;  nsString* str = new nsAutoString(aPropValue);  if (!str) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsCOMPtr<nsIUnicharInputStream> input;  nsresult rv = NS_NewStringUnicharInputStream(getter_AddRefs(input), str);  if (NS_FAILED(rv)) {    delete str;    return rv;  }  rv = InitScanner(input, aSheetURL, 0, aBaseURL);  if (NS_FAILED(rv)) {    return rv;  }  mSection = eCSSSection_General;  nsresult errorCode = NS_OK;  if (eCSSProperty_UNKNOWN == aPropID) { // unknown property    NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));    const PRUnichar *params[] = {      propName.get()    };    REPORT_UNEXPECTED_P(PEUnknownProperty, params);    REPORT_UNEXPECTED(PEDeclDropped);    OUTPUT_ERROR();    ReleaseScanner();    return NS_OK;  }    mData.AssertInitialState();  mTempData.AssertInitialState();  aDeclaration->ExpandTo(&mData);  nsresult result = NS_OK;  if (ParseProperty(errorCode, aPropID)) {    TransferTempData(aDeclaration, aPropID, PR_FALSE, aChanged);  } else {    NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));    const PRUnichar *params[] = {      propName.get()    };    REPORT_UNEXPECTED_P(PEPropertyParsingError, params);    REPORT_UNEXPECTED(PEDeclDropped);    OUTPUT_ERROR();    ClearTempData(aPropID);    NS_ASSERTION(errorCode != nsresult(-1), "-1 is no longer used for EOF");    result = errorCode;  }  CLEAR_ERROR();    aDeclaration->CompressFrom(&mData);    ReleaseScanner();  return result;}