result = parentFrame->GetParent((nsIFrame **)&parentFrame);
NS_METHOD nsTableFrame::GetTableFrame(nsIFrame *aSourceFrame, nsTableFrame *& aTableFrame){  nsresult rv = NS_ERROR_UNEXPECTED;  // the value returned  aTableFrame = nsnull;               // initialize out-param  nsIFrame *parentFrame=nsnull;  if (nsnull!=aSourceFrame)  {    // "result" is the result of intermediate calls, not the result we return from this method    nsresult result = aSourceFrame->GetParent((nsIFrame **)&parentFrame);     while ((NS_OK==result) && (nsnull!=parentFrame))    {      const nsStyleDisplay *display;      parentFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct *&)display);      if (NS_STYLE_DISPLAY_TABLE == display->mDisplay)      {        aTableFrame = (nsTableFrame *)parentFrame;        rv = NS_OK; // only set if we found the table frame        break;      }      result = parentFrame->GetParent((nsIFrame **)&parentFrame);    }  }  NS_POSTCONDITION(nsnull!=aTableFrame, "unable to find table parent. aTableFrame null.");  NS_POSTCONDITION(NS_OK==rv, "unable to find table parent. result!=NS_OK");  return rv;}