}while(aFrame && position);
if (aFrame) { aFrame->GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position); } else { position = nsnull; } }
nsComputedDOMStyle::GetZIndex(nsIFrame *aFrame,                              nsIDOMCSSPrimitiveValue*& aValue){  nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  const nsStylePosition* position = nsnull;  nsAutoString zindex;  do {    GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position,                 aFrame);    if(position){      if(position->mZIndex.GetUnit()==eStyleUnit_Integer) {        zindex.AppendInt(position->mZIndex.GetIntValue(), 10);        break;      }      aFrame->GetParent(&aFrame);    }  }while(aFrame && position);  val->SetString(zindex);  return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),                             (void **)&aValue);}