return CallQueryInterface(val, aValue);
switch(coord.GetUnit()) { case eStyleUnit_Coord: val->SetTwips(coord.GetCoordValue()); break; case eStyleUnit_Percent: { nsIFrame* parent=nsnull; aFrame->GetParent(&parent); if(parent) { nsRect rect; parent->GetRect(rect); val->SetTwips(nscoord(coord.GetPercentValue() * rect.width)); break; } } default: NS_WARNING("double check the unit"); break; } }  return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue), (void **)&aValue);
nsComputedDOMStyle::GetMarginWidthFor(PRUint8 aSide, nsIFrame *aFrame,                                      nsIDOMCSSValue** aValue){  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  FlushPendingReflows();  nscoord width = GetMarginWidthCoordFor(aSide, aFrame);  val->SetTwips(width);  return CallQueryInterface(val, aValue);}