if (outline) { switch (outline->mOutlineWidth.GetUnit()) { case eStyleUnit_Coord: val->SetTwips(outline->mOutlineWidth.GetCoordValue()); break; case eStyleUnit_Integer: case eStyleUnit_Proportional: case eStyleUnit_Enumerated: case eStyleUnit_Chars: { const nsAFlatCString& width= nsCSSProps::SearchKeywordTable(outline->mOutlineWidth.GetIntValue(), nsCSSProps::kBorderWidthKTable); val->SetIdent(width); break; } default: NS_WARNING("Double check the unit"); val->SetTwips(0); break; } }
val->SetTwips(outline? outline->mOutlineWidth.GetCoordValue():0);
nsComputedDOMStyle::GetOutlineWidth(nsIFrame *aFrame,                                    nsIDOMCSSValue** aValue){  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  const nsStyleOutline* outline = nsnull;  GetStyleData(eStyleStruct_Outline, (const nsStyleStruct*&)outline, aFrame);  if (outline) {    switch (outline->mOutlineWidth.GetUnit()) {      case eStyleUnit_Coord:        val->SetTwips(outline->mOutlineWidth.GetCoordValue());        break;      case eStyleUnit_Integer:      case eStyleUnit_Proportional:      case eStyleUnit_Enumerated:      case eStyleUnit_Chars:        {          const nsAFlatCString& width=            nsCSSProps::SearchKeywordTable(outline->mOutlineWidth.GetIntValue(),                                           nsCSSProps::kBorderWidthKTable);          val->SetIdent(width);          break;        }      default:        NS_WARNING("Double check the unit");        val->SetTwips(0);        break;    }  }  return CallQueryInterface(val, aValue);}