return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue), (void **)&aValue);
if (calcHeight) { nsRect rect; nsMargin padding; nsMargin border; aFrame->GetRect(rect); const nsStylePadding* paddingData=nsnull; GetStyleData(eStyleStruct_Padding, (const nsStyleStruct*&)paddingData, aFrame); if (paddingData) { paddingData->CalcPaddingFor(aFrame, padding); } const nsStyleBorder* borderData=nsnull; GetStyleData(eStyleStruct_Border, (const nsStyleStruct*&)borderData, aFrame); if (borderData) { borderData->CalcBorderFor(aFrame, border); }  val->SetTwips(rect.height - padding.top - padding.bottom - border.top - border.bottom); } else {  const nsStylePosition* positionData = nsnull; GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)positionData, aFrame); if (positionData) { switch (positionData->mHeight.GetUnit()) { case eStyleUnit_Coord: val->SetTwips(positionData->mHeight.GetCoordValue()); break; case eStyleUnit_Percent: val->SetPercent(positionData->mHeight.GetPercentValue()); break; case eStyleUnit_Auto: val->SetIdent(NS_LITERAL_STRING("auto")); break; case eStyleUnit_Inherit: val->SetIdent(NS_LITERAL_STRING("inherit")); break; default: NS_WARNING("Double check the unit"); val->SetTwips(0); break; } } else { val->SetTwips(0); } }  return CallQueryInterface(val, &aValue);
nsComputedDOMStyle::GetHeight(nsIFrame *aFrame,                             nsIDOMCSSPrimitiveValue*& aValue){  nsROCSSPrimitiveValue *val = GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  nsRect rect;  GetAbsoluteFrameRect(aFrame, rect);  val->SetTwips(rect.height);  return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),                             (void **)&aValue);}