if (font) { const nsAFlatCString& str_weight=
if(font) { const nsCString& str_weight=
nsComputedDOMStyle::GetFontWeight(nsIFrame *aFrame,                                  nsIDOMCSSValue** aValue){  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  const nsStyleFont* font = nsnull;  GetStyleData(eStyleStruct_Font, (const nsStyleStruct*&)font, aFrame);  if (font) {    const nsAFlatCString& str_weight=      nsCSSProps::SearchKeywordTable(font->mFont.weight,                                     nsCSSProps::kFontWeightKTable);    if (!str_weight.IsEmpty()) {      val->SetIdent(str_weight);    } else {      val->SetNumber(font->mFont.weight);    }  }  return CallQueryInterface(val, aValue);}