nsMargin borderPadding = GetChildAreaOffset(&aReflowState.reflowState);
nsMargin borderPadding = GetChildAreaOffset(&aPresContext, &aReflowState.reflowState);
nsTableFrame::RecoverState(nsTableReflowState& aReflowState,                           nsIFrame*           aKidFrame){  nsMargin borderPadding = GetChildAreaOffset(&aReflowState.reflowState);  aReflowState.y = borderPadding.top;  nscoord cellSpacingY = GetCellSpacingY();  // Get the ordered children and find aKidFrame in the list  nsAutoVoidArray rowGroups;  PRUint32 numRowGroups;  OrderRowGroups(rowGroups, numRowGroups, &aReflowState.firstBodySection);    // Walk the list of children looking for aKidFrame  for (PRUint32 childX = 0; childX < numRowGroups; childX++) {    nsIFrame* childFrame = (nsIFrame*)rowGroups.ElementAt(childX);    nsTableRowGroupFrame* rgFrame = GetRowGroupFrame(childFrame);    if (!rgFrame) continue; // skip foreign frame types       // If this is a footer row group, remember it    const nsStyleDisplay* display = rgFrame->GetStyleDisplay();    // We only allow a single footer frame    if ((NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP == display->mDisplay) &&        !aReflowState.footerFrame) {      aReflowState.footerFrame = childFrame;        }    else {      if ((NS_STYLE_DISPLAY_TABLE_ROW_GROUP == display->mDisplay) &&          !aReflowState.firstBodySection) {        aReflowState.firstBodySection = childFrame;      }    }    aReflowState.y += cellSpacingY;        // See if this is the frame we're looking for    if (childFrame == aKidFrame) {      break;    }    // Get the frame's height    nsSize kidSize = childFrame->GetSize();        // If our height is constrained then update the available height. Do    // this for all frames including the footer frame    if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {      aReflowState.availSize.height -= kidSize.height;    }    // Update the running y-offset. Don't do this for the footer frame    if (childFrame != aReflowState.footerFrame) {      aReflowState.y += kidSize.height;    }  }  return NS_OK;}