CSSParserImpl::ParseAndAppendDeclaration(const nsString&    aBuffer, nsIURI*            aBaseURL, nsICSSDeclaration* aDeclaration, PRBool             aParseOnlyOneDecl, PRInt32*           aHint)
CSSParserImpl::ParseAndAppendDeclaration(const nsAReadableString& aBuffer, nsIURI*                  aBaseURL, nsICSSDeclaration*       aDeclaration, PRBool                   aParseOnlyOneDecl, PRInt32*                 aHint)
CSSParserImpl::ParseAndAppendDeclaration(const nsString&    aBuffer,                                         nsIURI*            aBaseURL,                                         nsICSSDeclaration* aDeclaration,                                         PRBool             aParseOnlyOneDecl,                                         PRInt32*           aHint){//  NS_ASSERTION(nsnull != aBaseURL, "need base URL");  nsString* str = new nsString(aBuffer);  if (nsnull == str) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsIUnicharInputStream* input = nsnull;  nsresult rv = NS_NewStringUnicharInputStream(&input, str);  if (NS_OK != rv) {    delete str;    return rv;  }  rv = InitScanner(input, aBaseURL);  NS_RELEASE(input);  if (! NS_SUCCEEDED(rv)) {    return rv;  }  mSection = eCSSSection_General;  PRInt32 errorCode = NS_OK;  PRInt32 hint = NS_STYLE_HINT_NONE;  if (nsnull != aHint) {    *aHint = hint;  }  do {    if (ParseDeclaration(errorCode, aDeclaration, PR_FALSE, hint)) {      if (aHint && hint > *aHint) {        *aHint = hint;      }    } else {      if (errorCode != -1) { // -1 means EOF so we ignore that        rv = errorCode;      }      break;    }  } while (!aParseOnlyOneDecl);  ReleaseScanner();  return rv;}