if (!decl) { return result; }
if (NS_SUCCEEDED(result) && (decl)) { nsICSSLoader* cssLoader = nsnull; nsICSSParser* cssParser = nsnull; nsIURI* baseURI = nsnull; nsIDocument*  doc = nsnull;
nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAString& aDecl,                                               PRBool aParseOnlyOneDecl,                                               PRBool aClearOldDecl){  nsCSSDeclaration* decl;  nsresult result = GetCSSDeclaration(&decl, PR_TRUE);  if (!decl) {    return result;  }  nsCOMPtr<nsICSSLoader> cssLoader;  nsCOMPtr<nsICSSParser> cssParser;  nsCOMPtr<nsIURI> baseURI;  result = GetCSSParsingEnvironment(mContent,                                    getter_AddRefs(baseURI),                                    getter_AddRefs(cssLoader),                                    getter_AddRefs(cssParser));  if (NS_FAILED(result)) {    return result;  }  nsChangeHint uselessHint = NS_STYLE_HINT_NONE;  result = cssParser->ParseAndAppendDeclaration(aDecl, baseURI, decl,                                                aParseOnlyOneDecl,                                                &uselessHint,                                                aClearOldDecl);    if (NS_SUCCEEDED(result)) {    result = SetCSSDeclaration(decl, PR_TRUE, PR_TRUE);  }  if (cssLoader) {    cssLoader->RecycleParser(cssParser);  }  return result;}