nsAutoString num_weight; num_weight.AppendInt(font->mFont.weight, 10); val->SetString(num_weight);
val->SetNumber(font->mFont.weight);
nsComputedDOMStyle::GetFontWeight(nsIFrame *aFrame,                             nsIDOMCSSPrimitiveValue*& 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->SetString(str_weight);    }    else {      nsAutoString num_weight;      num_weight.AppendInt(font->mFont.weight, 10);      val->SetString(num_weight);    }  }  else {    val->SetString(NS_LITERAL_STRING(""));  }  return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),                             (void **)&aValue);}