if (!aFrameTypeIn) { NS_IF_RELEASE(frameType); }
nsTableFrame::GetRowGroupFrame(nsIFrame* aFrame,                               nsIAtom*  aFrameTypeIn){  nsIFrame* rgFrame = nsnull;  nsIAtom* frameType = aFrameTypeIn;  if (!aFrameTypeIn) {    aFrame->GetFrameType(&frameType);  }  if (nsLayoutAtoms::tableRowGroupFrame == frameType) {    rgFrame = aFrame;  }  else if (nsLayoutAtoms::scrollFrame == frameType) {    nsIScrollableFrame* scrollable = nsnull;    nsresult rv = aFrame->QueryInterface(kIScrollableFrameIID, (void **)&scrollable);    if (NS_SUCCEEDED(rv) && (scrollable)) {      nsIFrame* scrolledFrame;      scrollable->GetScrolledFrame(nsnull, scrolledFrame);      if (scrolledFrame) {        nsIAtom* scrolledType;        scrolledFrame->GetFrameType(&scrolledType);        if (nsLayoutAtoms::tableRowGroupFrame == scrolledType) {          rgFrame = scrolledFrame;        }        NS_IF_RELEASE(scrolledType);      }    }  }  if (!aFrameTypeIn) {    NS_IF_RELEASE(frameType);  }  return (nsTableRowGroupFrame*)rgFrame;}