aFrame->GetParent(&aFrame);
GetNearestContainingBlock(nsIFrame* aFrame, nsMargin& aContentArea){  aFrame->GetParent(&aFrame);  while (aFrame) {    nsIAtom*  frameType;    PRBool    isBlock;    aFrame->GetFrameType(&frameType);    isBlock = frameType == nsLayoutAtoms::blockFrame;    NS_IF_RELEASE(frameType);    if (isBlock) {      break;    }  }  if (aFrame) {    nsSize  size;      aFrame->GetSize(size);    aContentArea.left = 0;    aContentArea.top = 0;    aContentArea.right = size.width;    aContentArea.bottom = size.height;      // Subtract off for border and padding. If it can't be computed because    // it's percentage based (for example) then just ignore it    nsStyleSpacing*  spacing;    nsMargin         borderPadding;    aFrame->GetStyleData(eStyleStruct_Spacing, (const nsStyleStruct*&)spacing);    if (spacing->GetBorderPadding(borderPadding)) {      aContentArea.left += borderPadding.left;      aContentArea.top += borderPadding.top;      aContentArea.right -= borderPadding.right;      aContentArea.bottom -= borderPadding.bottom;    }  }  return aFrame;}