nsRect spanCombinedArea; nsRect* r = &pfd->mCombinedArea;
nsRect r;
nsLineLayout::RelativePositionFrames(PerSpanData* psd, nsRect& aCombinedArea){  nsRect combinedAreaResult;  if (nsnull != psd->mFrame) {    // The minimum combined area for the frames in a span covers the    // entire span frame's overflow area. The span frame might have    // overflowing additional non-inline frames (e.g. absolute children    // of a relatively positioned span) and we need to make sure their     // overflow area, if any, makes it into our final combined area.    combinedAreaResult = psd->mFrame->mCombinedArea;  }  else {    // The minimum combined area for the frames that are direct    // children of the block starts at the upper left corner of the    // line and is sized to match the size of the line's bounding box    // (the same size as the values returned from VerticalAlignFrames)    combinedAreaResult.x = psd->mLeftEdge;    // If this turns out to be negative, the rect will be treated as empty.    // Which is just fine.    combinedAreaResult.width = psd->mX - combinedAreaResult.x;    combinedAreaResult.y = mTopEdge;    combinedAreaResult.height = mFinalLineHeight;  }  for (PerFrameData* pfd = psd->mFirstFrame; pfd; pfd = pfd->mNext) {    nsPoint origin = nsPoint(pfd->mBounds.x, pfd->mBounds.y);    nsIFrame* frame = pfd->mFrame;    // Adjust the origin of the frame    if (pfd->GetFlag(PFD_RELATIVEPOS)) {      // right and bottom are handled by      // nsHTMLReflowState::ComputeRelativeOffsets      nsPoint change(pfd->mOffsets.left, pfd->mOffsets.top);      frame->SetPosition(frame->GetPosition() + change);      origin += change;    }    // We must position the view correctly before positioning its    // descendants so that widgets are positioned properly (since only    // some views have widgets).    if (frame->HasView())      nsContainerFrame::SyncFrameViewAfterReflow(mPresContext, frame,                                                 frame->GetView(),                                                 &pfd->mCombinedArea, //ignored                                                 NS_FRAME_NO_SIZE_VIEW);    // Note: the combined area of a child is in its coordinate    // system. We adjust the childs combined area into our coordinate    // system before computing the aggregated value by adding in    // <b>x</b> and <b>y</b> which were computed above.    nsRect spanCombinedArea;    nsRect* r = &pfd->mCombinedArea;    if (pfd->mSpan) {      // Compute a new combined area for the child span before      // aggregating it into our combined area.      r = &spanCombinedArea;      RelativePositionFrames(pfd->mSpan, spanCombinedArea);    } else {      // If we have something that's not an inline but with a complex frame      // hierarchy inside that contains views, they need to be      // positioned.      // All descendant views must be repositioned even if this frame      // does have a view in case this frame's view does not have a      // widget and some of the descendant views do have widgets --      // otherwise the widgets won't be repositioned.      nsContainerFrame::PositionChildViews(mPresContext, frame);    }    // Do this here (rather than along with NS_FRAME_OUTSIDE_CHILDREN    // handling below) so we get leaf frames as well.  No need to worry    // about the root span, since it doesn't have a frame.    if (frame->HasView())      nsContainerFrame::SyncFrameViewAfterReflow(mPresContext, frame,                                                 frame->GetView(), r,                                                 NS_FRAME_NO_MOVE_VIEW);    combinedAreaResult.UnionRect(combinedAreaResult, *r + origin);  }  // If we just computed a spans combined area, we need to update its  // NS_FRAME_OUTSIDE_CHILDREN bit..  if (psd->mFrame) {    PerFrameData* spanPFD = psd->mFrame;    nsIFrame* frame = spanPFD->mFrame;    frame->FinishAndStoreOverflow(&combinedAreaResult, frame->GetSize());  }  aCombinedArea = combinedAreaResult;}